Rollup merge of #103333 - chenyukang:yukang/fix-103143, r=wesleywiser

Fix assertion failed for break_last_token and trailing token

Fixes #103143
This commit is contained in:
Yuki Okushi 2022-10-25 08:01:27 +09:00 committed by GitHub
commit 11d11e3415
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 5 deletions

View file

@ -0,0 +1,5 @@
fn main() {
x::<#[a]y::<z>>
//~^ ERROR invalid const generic expression
//~| ERROR cannot find value `x` in this scope
}

View file

@ -0,0 +1,20 @@
error: invalid const generic expression
--> $DIR/issue-103143.rs:2:13
|
LL | x::<#[a]y::<z>>
| ^^^^^^
|
help: expressions must be enclosed in braces to be used as const generic arguments
|
LL | x::<#[a]{ y::<z> }>
| + +
error[E0425]: cannot find value `x` in this scope
--> $DIR/issue-103143.rs:2:5
|
LL | x::<#[a]y::<z>>
| ^ not found in this scope
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0425`.