summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/keyword-box-as-identifier.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/keyword-box-as-identifier.rs')
-rw-r--r--tests/ui/parser/keyword-box-as-identifier.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/parser/keyword-box-as-identifier.rs b/tests/ui/parser/keyword-box-as-identifier.rs
new file mode 100644
index 000000000..2cf49b66b
--- /dev/null
+++ b/tests/ui/parser/keyword-box-as-identifier.rs
@@ -0,0 +1,10 @@
+fn main() {
+ let box = 0;
+ //~^ ERROR expected pattern, found `=`
+ let box: bool;
+ //~^ ERROR expected pattern, found `:`
+ let mut box = 0;
+ //~^ ERROR expected pattern, found `=`
+ let (box,) = (0,);
+ //~^ ERROR expected pattern, found `,`
+}