Skip to content

Commit 298e160

Browse files
committed
Assume there are no macros left in ast lowering.
1 parent 5659310 commit 298e160

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

compiler/rustc_ast_lowering/src/format.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,8 @@ fn may_contain_yield_point(e: &ast::Expr) -> bool {
334334
}
335335

336336
fn visit_mac_call(&mut self, _: &ast::MacCall) {
337-
self.0 = true;
338-
}
339-
340-
fn visit_attribute(&mut self, _: &ast::Attribute) {
341-
// Conservatively assume this may be a proc macro attribute in
342-
// expression position.
343-
self.0 = true;
337+
// Macros should be expanded at this point.
338+
unreachable!("unexpanded macro in ast lowering");
344339
}
345340

346341
fn visit_item(&mut self, _: &ast::Item) {

0 commit comments

Comments
 (0)