summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/bad-let-as-field.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/bad-let-as-field.stderr')
-rw-r--r--tests/ui/parser/bad-let-as-field.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/parser/bad-let-as-field.stderr b/tests/ui/parser/bad-let-as-field.stderr
new file mode 100644
index 000000000..57def42b1
--- /dev/null
+++ b/tests/ui/parser/bad-let-as-field.stderr
@@ -0,0 +1,15 @@
+error: expected identifier, found keyword `let`
+ --> $DIR/bad-let-as-field.rs:2:5
+ |
+LL | struct Foo {
+ | --- while parsing this struct
+LL | let: i32,
+ | ^^^ expected identifier, found keyword
+ |
+help: escape `let` to use it as an identifier
+ |
+LL | r#let: i32,
+ | ++
+
+error: aborting due to previous error
+