Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --I don't have a minimal example yet, but here's . Sample: The ICE happens on the and macros, which are both from the crate. <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --This began with commit . <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
FYI, I think that link is only accessible to Googlers: !
Sorry, .
Minimized: Caused by
When we run on the AST, we create a definition for the desugared closure body inside an : As a result, the entry for our macro call will have the of the desugared closure. However, this desugared closure does not actually exist in the AST (it is created during lowering), so we will never check for lints with its when we emit buffered early lints.
Nightly has been broken for 3 days, if there's disagreement on how to fix the issue, can we revert while the fix is being worked on?
This will be fixed by PR
I'm still hitting this bug with the latest nightly.

Discussion:
run_early_pass!(self, check_fn, fk, span, id); self.check_id(id); ast_visit::walk_fn(self, fk, span); <ins> // Explicitly check for lints associated with 'closure_id', since // it does not have a corresponding AST node if let ast_visit::FnKind::Fn(_, _, sig, _, _) = fk { if let ast::Async::Yes { closure_id, .. } = sig.header.asyncness { self.check_id(closure_id); } } </ins> run_early_pass!(self, check_fn_post, fk, span, id); }

fn visit_expr_post(&mut self, e: &'a ast::Expr) { run_early_pass!(self, check_expr_post, e); <ins> // Explicitly check for lints associated with 'closure_id', since // it does not have a corresponding AST node if let ast::ExprKind::Closure(_, asyncness, ..) = e.kind { if let ast::Async::Yes { closure_id, .. } = asyncness { self.check_id(closure_id); } } </ins> } fn visit_generic_arg(&mut self, arg: &'a ast::GenericArg) {

// check-pass <ins> // edition:2018 </ins> #![warn(semicolon_in_expressions_from_macros)] #[allow(dead_code)]

} } <ins> #[allow(semicolon_in_expressions_from_macros)] async fn bar() { foo!(first); } </ins> fn main() { // This `allow` doesn't work #[allow(semicolon_in_expressions_from_macros)]

warning: trailing semicolon in macro used in expression position <del> --> $DIR/semicolon-in-expressions-from-macros.rs:7:13 </del> <ins> --> $DIR/semicolon-in-expressions-from-macros.rs:8:13 </ins> | LL |         true; |             ^

|         ----------- in this macro invocation | note: the lint level is defined here <del> --> $DIR/semicolon-in-expressions-from-macros.rs:2:9 </del> <ins> --> $DIR/semicolon-in-expressions-from-macros.rs:3:9 </ins> | LL | #![warn(semicolon_in_expressions_from_macros)] |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: trailing semicolon in macro used in expression position <del> --> $DIR/semicolon-in-expressions-from-macros.rs:7:13 </del> <ins> --> $DIR/semicolon-in-expressions-from-macros.rs:8:13 </ins> | LL |         true; |             ^