summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/suggest-const-for-global-var.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/suggest-const-for-global-var.rs')
-rw-r--r--tests/ui/parser/suggest-const-for-global-var.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/parser/suggest-const-for-global-var.rs b/tests/ui/parser/suggest-const-for-global-var.rs
new file mode 100644
index 000000000..d6216cb7a
--- /dev/null
+++ b/tests/ui/parser/suggest-const-for-global-var.rs
@@ -0,0 +1,6 @@
+let X: i32 = 12;
+//~^ ERROR expected item, found keyword `let`
+
+fn main() {
+ println!("{}", X);
+}