diff --git a/compiler/rustc_ast_lowering/src/format.rs b/compiler/rustc_ast_lowering/src/format.rs index f21c0f23bc1..693b9a399cf 100644 --- a/compiler/rustc_ast_lowering/src/format.rs +++ b/compiler/rustc_ast_lowering/src/format.rs @@ -334,13 +334,8 @@ fn may_contain_yield_point(e: &ast::Expr) -> bool { } fn visit_mac_call(&mut self, _: &ast::MacCall) { - self.0 = true; - } - - fn visit_attribute(&mut self, _: &ast::Attribute) { - // Conservatively assume this may be a proc macro attribute in - // expression position. - self.0 = true; + // Macros should be expanded at this point. + unreachable!("unexpanded macro in ast lowering"); } fn visit_item(&mut self, _: &ast::Item) {