]> git.lizzy.rs Git - rust.git/commitdiff
Remove a token after closing delimiter from the span of macro in type position
authortopecongiro <seuchida@gmail.com>
Tue, 19 Dec 2017 08:54:39 +0000 (17:54 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Tue, 19 Dec 2017 12:18:30 +0000 (21:18 +0900)
src/libsyntax/parse/parser.rs

index c3dd17e8775668ca8c2526bc481020d392ebb010..74ec11b83c78a80a2bcf7856f38c4f4e4e5bae62 100644 (file)
@@ -1553,7 +1553,7 @@ fn parse_ty_common(&mut self, allow_plus: bool) -> PResult<'a, P<Ty>> {
             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`