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:
commit
11d11e3415
5 changed files with 36 additions and 5 deletions
5
src/test/ui/parser/issue-103143.rs
Normal file
5
src/test/ui/parser/issue-103143.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
fn main() {
|
||||
x::<#[a]y::<z>>
|
||||
//~^ ERROR invalid const generic expression
|
||||
//~| ERROR cannot find value `x` in this scope
|
||||
}
|
||||
20
src/test/ui/parser/issue-103143.stderr
Normal file
20
src/test/ui/parser/issue-103143.stderr
Normal 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`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue