diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c3dd17e877566..74ec11b83c78a 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1553,7 +1553,7 @@ impl<'a> Parser<'a> { if self.eat(&token::Not) { // Macro invocation in type position let (_, tts) = self.expect_delimited_token_tree()?; - TyKind::Mac(respan(lo.to(self.span), Mac_ { path: path, tts: tts })) + TyKind::Mac(respan(lo.to(self.prev_span), Mac_ { path: path, tts: tts })) } else { // Just a type path or bound list (trait object type) starting with a trait. // `Type` diff --git a/src/test/ui/issue-32950.stderr b/src/test/ui/issue-32950.stderr index 0933c81d65560..abfa03f4d581a 100644 --- a/src/test/ui/issue-32950.stderr +++ b/src/test/ui/issue-32950.stderr @@ -1,9 +1,8 @@ error: `derive` cannot be used on items with type macros --> $DIR/issue-32950.rs:15:5 | -15 | / concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros -16 | | ); - | |_^ +15 | concat_idents!(Foo, Bar) //~ ERROR `derive` cannot be used on items with type macros + | ^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error