Skip to content

Commit 577d2cf

Browse files
committed
Add test for issue 102986
1 parent 3df9afc commit 577d2cf

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/test/rustdoc-ui/issue-102986.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
struct Struct {
2+
y: (typeof("hey"),),
3+
//~^ `typeof` is a reserved keyword but unimplemented
4+
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0516]: `typeof` is a reserved keyword but unimplemented
2+
--> $DIR/issue-102986.rs:2:9
3+
|
4+
LL | y: (typeof("hey"),),
5+
| ^^^^^^^^^^^^^ reserved keyword
6+
|
7+
help: consider replacing `typeof(...)` with an actual type
8+
|
9+
LL | y: (&'static str,),
10+
| ~~~~~~~~~~~~
11+
12+
error: aborting due to previous error
13+
14+
For more information about this error, try `rustc --explain E0516`.

0 commit comments

Comments
 (0)