diff --git a/src/test/rustdoc-ui/issue-102986.rs b/src/test/rustdoc-ui/issue-102986.rs new file mode 100644 index 0000000000000..001784ac28561 --- /dev/null +++ b/src/test/rustdoc-ui/issue-102986.rs @@ -0,0 +1,4 @@ +struct Struct { + y: (typeof("hey"),), + //~^ `typeof` is a reserved keyword but unimplemented +} diff --git a/src/test/rustdoc-ui/issue-102986.stderr b/src/test/rustdoc-ui/issue-102986.stderr new file mode 100644 index 0000000000000..3a573726c9727 --- /dev/null +++ b/src/test/rustdoc-ui/issue-102986.stderr @@ -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`.