]> git.proxmox.com Git - rustc.git/blobdiff - src/librustdoc/core.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / librustdoc / core.rs
index 1c0e0b3bf410b5de1f526f26e3b14244a81ca815..8bc34e949f175649cd0ec54e72eb92aac4d2c31e 100644 (file)
@@ -11,17 +11,16 @@ use rustc_hir::def::Namespace::TypeNS;
 use rustc_hir::def_id::{CrateNum, DefId, DefIndex, LOCAL_CRATE};
 use rustc_hir::HirId;
 use rustc_interface::interface;
-use rustc_lint;
 use rustc_resolve as resolve;
 use rustc_session::lint;
 
+use rustc_ast::ast::CRATE_NODE_ID;
+use rustc_attr as attr;
 use rustc_errors::emitter::{Emitter, EmitterWriter};
 use rustc_errors::json::JsonEmitter;
 use rustc_span::source_map;
 use rustc_span::symbol::sym;
 use rustc_span::DUMMY_SP;
-use syntax::ast::CRATE_NODE_ID;
-use syntax::attr;
 
 use rustc_data_structures::sync::{self, Lrc};
 use std::cell::RefCell;
@@ -178,7 +177,7 @@ pub fn new_handler(
             Box::new(
                 EmitterWriter::stderr(
                     color_config,
-                    source_map.map(|cm| cm as _),
+                    source_map.map(|sm| sm as _),
                     short,
                     debugging_opts.teach,
                     debugging_opts.terminal_width,
@@ -284,7 +283,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
         .filter_map(|lint| {
             // We don't want to whitelist *all* lints so let's
             // ignore those ones.
-            if whitelisted_lints.iter().any(|l| &lint.name == l) {
+            if whitelisted_lints.iter().any(|l| lint.name == l) {
                 None
             } else {
                 Some((lint::LintId::of(lint), lint::Allow))
@@ -417,7 +416,10 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
                                                          considered deprecated",
                         name
                     ));
-                    msg.warn("please see https://github.com/rust-lang/rust/issues/44136");
+                    msg.warn(
+                        "see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
+                         for more information",
+                    );
 
                     if name == "no_default_passes" {
                         msg.help("you may want to use `#![doc(document_private_items)]`");