summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/keyword-box-as-identifier.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/parser/keyword-box-as-identifier.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/parser/keyword-box-as-identifier.stderr')
-rw-r--r--tests/ui/parser/keyword-box-as-identifier.stderr66
1 files changed, 66 insertions, 0 deletions
diff --git a/tests/ui/parser/keyword-box-as-identifier.stderr b/tests/ui/parser/keyword-box-as-identifier.stderr
new file mode 100644
index 000000000..eaa1f8003
--- /dev/null
+++ b/tests/ui/parser/keyword-box-as-identifier.stderr
@@ -0,0 +1,66 @@
+error: expected pattern, found `=`
+ --> $DIR/keyword-box-as-identifier.rs:2:13
+ |
+LL | let box = 0;
+ | ^
+ |
+note: `box` is a reserved keyword
+ --> $DIR/keyword-box-as-identifier.rs:2:9
+ |
+LL | let box = 0;
+ | ^^^
+help: escape `box` to use it as an identifier
+ |
+LL | let r#box = 0;
+ | ++
+
+error: expected pattern, found `:`
+ --> $DIR/keyword-box-as-identifier.rs:4:12
+ |
+LL | let box: bool;
+ | ^
+ |
+note: `box` is a reserved keyword
+ --> $DIR/keyword-box-as-identifier.rs:4:9
+ |
+LL | let box: bool;
+ | ^^^
+help: escape `box` to use it as an identifier
+ |
+LL | let r#box: bool;
+ | ++
+
+error: expected pattern, found `=`
+ --> $DIR/keyword-box-as-identifier.rs:6:17
+ |
+LL | let mut box = 0;
+ | ^
+ |
+note: `box` is a reserved keyword
+ --> $DIR/keyword-box-as-identifier.rs:6:13
+ |
+LL | let mut box = 0;
+ | ^^^
+help: escape `box` to use it as an identifier
+ |
+LL | let mut r#box = 0;
+ | ++
+
+error: expected pattern, found `,`
+ --> $DIR/keyword-box-as-identifier.rs:8:13
+ |
+LL | let (box,) = (0,);
+ | ^
+ |
+note: `box` is a reserved keyword
+ --> $DIR/keyword-box-as-identifier.rs:8:10
+ |
+LL | let (box,) = (0,);
+ | ^^^
+help: escape `box` to use it as an identifier
+ |
+LL | let (r#box,) = (0,);
+ | ++
+
+error: aborting due to 4 previous errors
+