about summary refs log tree commit diff
path: root/src/librustc_interface
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-07-10 16:55:06 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-07-15 10:54:05 -0400
commit0cbc1cddcc6b9657fb727e35dce753d38e52cc52 (patch)
treeb068957b361788da6b31dd7d73a5e7e9d5749d26 /src/librustc_interface
parentcf844d2eabc8929edb0923d71ec6ff076ac3428b (diff)
downloadrust-0cbc1cddcc6b9657fb727e35dce753d38e52cc52.tar.gz
rust-0cbc1cddcc6b9657fb727e35dce753d38e52cc52.zip
Avoid unnecessary enum
Just use a boolean instead.
Diffstat (limited to 'src/librustc_interface')
-rw-r--r--src/librustc_interface/passes.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs
index 690ed9decb9..6505803eba8 100644
--- a/src/librustc_interface/passes.rs
+++ b/src/librustc_interface/passes.rs
@@ -233,8 +233,6 @@ fn configure_and_expand_inner<'a>(
     resolver_arenas: &'a ResolverArenas<'a>,
     metadata_loader: &'a MetadataLoaderDyn,
 ) -> Result<(ast::Crate, Resolver<'a>)> {
-    use rustc_resolve::IgnoreState;
-
     log::trace!("configure_and_expand_inner");
     pre_expansion_lint(sess, lint_store, &krate);
 
@@ -413,10 +411,7 @@ fn configure_and_expand_inner<'a>(
         println!("{}", json::as_json(&krate));
     }
 
-    // If we're actually rustdoc then avoid giving a name resolution error for `cfg()` items.
-    let ignore_bodies =
-        if sess.opts.actually_rustdoc { IgnoreState::Ignore } else { IgnoreState::Report };
-    resolver.resolve_crate(&krate, ignore_bodies);
+    resolver.resolve_crate(&krate);
 
     // Needs to go *after* expansion to be able to check the results of macro expansion.
     sess.time("complete_gated_feature_checking", || {