'label can start expressions
let foo = 'label: loop { break 'label 42; };
is valid Rust code.
This commit is contained in:
parent
9af69fe232
commit
40f2ca2c95
1 changed files with 2 additions and 1 deletions
|
|
@ -277,9 +277,10 @@ impl Token {
|
|||
DotDot | DotDotDot | DotDotEq | // range notation
|
||||
Lt | BinOp(Shl) | // associated path
|
||||
ModSep | // global path
|
||||
Lifetime(..) | // labeled loop
|
||||
Pound => true, // expression attributes
|
||||
Interpolated(ref nt) => match nt.0 {
|
||||
NtIdent(..) | NtExpr(..) | NtBlock(..) | NtPath(..) => true,
|
||||
NtIdent(..) | NtExpr(..) | NtBlock(..) | NtPath(..) | NtLifetime(..) => true,
|
||||
_ => false,
|
||||
},
|
||||
_ => false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue