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