about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-01-22 14:50:21 -0500
committerJoshua Nelson <jyn514@gmail.com>2021-01-22 14:50:21 -0500
commit0679a4cd93db7dfd33b45cd5bd6be52a0f5e894a (patch)
tree56bf1c793bcaf3da4849a539aef72290a44352ac /compiler
parent65767e56537e20903b54ecde7c371cbfb1b201b0 (diff)
downloadrust-0679a4cd93db7dfd33b45cd5bd6be52a0f5e894a.tar.gz
rust-0679a4cd93db7dfd33b45cd5bd6be52a0f5e894a.zip
Remove special casing of rustdoc in rustc_lint
This is no longer necessary now that rustdoc doesn't run
everybody_loops.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_lint/src/early.rs14
1 files changed, 3 insertions, 11 deletions
diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs
index 08c147ec3ac..e36af234936 100644
--- a/compiler/rustc_lint/src/early.rs
+++ b/compiler/rustc_lint/src/early.rs
@@ -379,17 +379,9 @@ pub fn check_ast_crate<T: EarlyLintPass>(
     // All of the buffered lints should have been emitted at this point.
     // If not, that means that we somehow buffered a lint for a node id
     // that was not lint-checked (perhaps it doesn't exist?). This is a bug.
-    //
-    // Rustdoc runs everybody-loops before the early lints and removes
-    // function bodies, so it's totally possible for linted
-    // node ids to not exist (e.g., macros defined within functions for the
-    // unused_macro lint) anymore. So we only run this check
-    // when we're not in rustdoc mode. (see issue #47639)
-    if !sess.opts.actually_rustdoc {
-        for (_id, lints) in buffered.map {
-            for early_lint in lints {
-                sess.delay_span_bug(early_lint.span, "failed to process buffered lint here");
-            }
+    for (_id, lints) in buffered.map {
+        for early_lint in lints {
+            sess.delay_span_bug(early_lint.span, "failed to process buffered lint here");
         }
     }
 }