]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/core.rs
Use () for privacy.
[rust.git] / src / librustdoc / core.rs
index b0d163763b4bd249178bcb85ccbfa5786ec029d3..0f8750b082569794777854d363b58287f28029a8 100644 (file)
@@ -226,14 +226,7 @@ impl<'tcx> DocContext<'tcx> {
     lints_to_show.extend(crate::lint::RUSTDOC_LINTS.iter().map(|lint| lint.name.to_string()));
 
     let (lint_opts, lint_caps) = crate::lint::init_lints(lints_to_show, lint_opts, |lint| {
-        // FIXME: why is this necessary?
-        if lint.name == crate::lint::BROKEN_INTRA_DOC_LINKS.name
-            || lint.name == crate::lint::INVALID_CODEBLOCK_ATTRIBUTES.name
-        {
-            None
-        } else {
-            Some((lint.name_lower(), lint::Allow))
-        }
+        Some((lint.name_lower(), lint::Allow))
     });
 
     let crate_types =
@@ -355,7 +348,7 @@ impl<'tcx> DocContext<'tcx> {
     });
     rustc_passes::stability::check_unused_or_stable_features(tcx);
 
-    let access_levels = tcx.privacy_access_levels(LOCAL_CRATE);
+    let access_levels = tcx.privacy_access_levels(());
     // Convert from a HirId set to a DefId set since we don't always have easy access
     // to the map from defid -> hirid
     let access_levels = AccessLevels {
@@ -406,18 +399,15 @@ impl<'tcx> DocContext<'tcx> {
     let mut krate = tcx.sess.time("clean_crate", || clean::krate(&mut ctxt));
 
     if krate.module.doc_value().map(|d| d.is_empty()).unwrap_or(true) {
-        let help = format!(
-            "The following guide may be of use:\n\
-            https://doc.rust-lang.org/{}/rustdoc/how-to-write-documentation.html",
-            crate::doc_rust_lang_org_channel(),
-        );
+        let help = "The following guide may be of use:\n\
+                https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation.html";
         tcx.struct_lint_node(
             crate::lint::MISSING_CRATE_LEVEL_DOCS,
             DocContext::as_local_hir_id(tcx, krate.module.def_id).unwrap(),
             |lint| {
                 let mut diag =
                     lint.build("no documentation found for this crate's top-level module");
-                diag.help(&help);
+                diag.help(help);
                 diag.emit();
             },
         );