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 =
});
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 {
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();
},
);