diff options
Diffstat (limited to 'src/test/ui/parser/keyword-return-as-identifier.stderr')
-rw-r--r-- | src/test/ui/parser/keyword-return-as-identifier.stderr | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/parser/keyword-return-as-identifier.stderr b/src/test/ui/parser/keyword-return-as-identifier.stderr new file mode 100644 index 000000000..eeb8e468b --- /dev/null +++ b/src/test/ui/parser/keyword-return-as-identifier.stderr @@ -0,0 +1,13 @@ +error: expected identifier, found keyword `return` + --> $DIR/keyword-return-as-identifier.rs:4:9 + | +LL | let return = "foo"; + | ^^^^^^ expected identifier, found keyword + | +help: escape `return` to use it as an identifier + | +LL | let r#return = "foo"; + | ++ + +error: aborting due to previous error + |