We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5c464a commit d5b3606Copy full SHA for d5b3606
src/libsyntax/ext/tt/macro_parser.rs
@@ -761,7 +761,7 @@ pub fn parse(
761
else if bb_items.is_empty() && next_items.is_empty() {
762
return Failure(
763
parser.span,
764
- parser.token,
+ parser.token.clone(),
765
"no rules expected this token in macro call",
766
);
767
}
src/libsyntax/parse/parser.rs
@@ -259,6 +259,13 @@ pub struct Parser<'a> {
259
last_unexpected_token_span: Option<Span>,
260
261
262
+impl<'a> Drop for Parser<'a> {
263
+ fn drop(&mut self) {
264
+ if !self.unclosed_delims.is_empty() {
265
+ panic!("unclosed delimiter errors not emitted");
266
+ }
267
268
+}
269
270
#[derive(Clone)]
271
struct TokenCursor {
0 commit comments