1
Fork 0

Add test for issue 102986

This commit is contained in:
Maybe Waffle 2022-10-13 14:57:50 +00:00
parent 3df9afcae7
commit 577d2cfbcc
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,4 @@
struct Struct {
y: (typeof("hey"),),
//~^ `typeof` is a reserved keyword but unimplemented
}

View file

@ -0,0 +1,14 @@
error[E0516]: `typeof` is a reserved keyword but unimplemented
--> $DIR/issue-102986.rs:2:9
|
LL | y: (typeof("hey"),),
| ^^^^^^^^^^^^^ reserved keyword
|
help: consider replacing `typeof(...)` with an actual type
|
LL | y: (&'static str,),
| ~~~~~~~~~~~~
error: aborting due to previous error
For more information about this error, try `rustc --explain E0516`.