Don't run analysis pass in rustdoc
- Explicitly check for missing docs - Don't run any lints except those we explicitly specified
This commit is contained in:
parent
a5275ff415
commit
b3187aabd2
2 changed files with 7 additions and 6 deletions
|
|
@ -410,7 +410,6 @@ fn configure_and_expand_inner<'a>(
|
|||
// anything, so switch everything to just looping
|
||||
resolver.resolve_crate(&krate, sess.opts.actually_rustdoc);
|
||||
|
||||
//let mut should_loop = sess.opts.actually_rustdoc;
|
||||
let mut should_loop = false;
|
||||
if let Some(PpMode::PpmSource(PpSourceMode::PpmEveryBodyLoops)) = sess.opts.pretty {
|
||||
should_loop |= true;
|
||||
|
|
|
|||
|
|
@ -372,7 +372,10 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
|
|||
crate_name,
|
||||
lint_caps,
|
||||
register_lints: None,
|
||||
override_queries: None,
|
||||
override_queries: Some(|_sess, local_providers, external_providers| {
|
||||
local_providers.lint_mod = |_, _| {};
|
||||
external_providers.lint_mod = |_, _| {};
|
||||
}),
|
||||
registry: rustc_driver::diagnostics_registry(),
|
||||
};
|
||||
|
||||
|
|
@ -416,10 +419,9 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
|
|||
let mut global_ctxt = abort_on_err(queries.global_ctxt(), sess).take();
|
||||
|
||||
global_ctxt.enter(|tcx| {
|
||||
tcx.analysis(LOCAL_CRATE).ok();
|
||||
|
||||
// Abort if there were any errors so far
|
||||
sess.abort_if_errors();
|
||||
sess.time("missing_docs", || {
|
||||
rustc_lint::check_crate(tcx, rustc_lint::builtin::MissingDoc::new);
|
||||
});
|
||||
|
||||
let access_levels = tcx.privacy_access_levels(LOCAL_CRATE);
|
||||
// Convert from a HirId set to a DefId set since we don't always have easy access
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue