Tests
This commit is contained in:
parent
2731dc169c
commit
180d6b55ca
8 changed files with 97 additions and 8 deletions
|
@ -2841,7 +2841,12 @@ impl<'a> Parser<'a> {
|
|||
maybe_whole!(deref self, NtTT);
|
||||
match self.token {
|
||||
token::CloseDelim(_) => {
|
||||
panic!("should have been caught above");
|
||||
// An unexpected closing delimiter (i.e., there is no
|
||||
// matching opening delimiter).
|
||||
let token_str = self.this_token_to_string();
|
||||
let err = self.diagnostic().struct_span_err(self.span,
|
||||
&format!("unexpected close delimiter: `{}`", token_str));
|
||||
Err(err)
|
||||
},
|
||||
/* we ought to allow different depths of unquotation */
|
||||
token::Dollar | token::SubstNt(..) if self.quote_depth > 0 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue