summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.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/issues/issue-65257-invalid-var-decl-recovery.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/issues/issue-65257-invalid-var-decl-recovery.stderr')
-rw-r--r--tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr67
1 files changed, 67 insertions, 0 deletions
diff --git a/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr b/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr
new file mode 100644
index 000000000..0a88dd2c4
--- /dev/null
+++ b/tests/ui/parser/issues/issue-65257-invalid-var-decl-recovery.stderr
@@ -0,0 +1,67 @@
+error: invalid variable declaration
+ --> $DIR/issue-65257-invalid-var-decl-recovery.rs:2:5
+ |
+LL | auto n = 0;
+ | ^^^^
+ |
+help: write `let` instead of `auto` to introduce a new variable
+ |
+LL | let n = 0;
+ | ~~~
+
+error: invalid variable declaration
+ --> $DIR/issue-65257-invalid-var-decl-recovery.rs:4:5
+ |
+LL | auto m;
+ | ^^^^
+ |
+help: write `let` instead of `auto` to introduce a new variable
+ |
+LL | let m;
+ | ~~~
+
+error: invalid variable declaration
+ --> $DIR/issue-65257-invalid-var-decl-recovery.rs:8:5
+ |
+LL | var n = 0;
+ | ^^^
+ |
+help: write `let` instead of `var` to introduce a new variable
+ |
+LL | let n = 0;
+ | ~~~
+
+error: invalid variable declaration
+ --> $DIR/issue-65257-invalid-var-decl-recovery.rs:10:5
+ |
+LL | var m;
+ | ^^^
+ |
+help: write `let` instead of `var` to introduce a new variable
+ |
+LL | let m;
+ | ~~~
+
+error: invalid variable declaration
+ --> $DIR/issue-65257-invalid-var-decl-recovery.rs:14:5
+ |
+LL | mut n = 0;
+ | ^^^ help: missing keyword: `let mut`
+
+error: invalid variable declaration
+ --> $DIR/issue-65257-invalid-var-decl-recovery.rs:16:5
+ |
+LL | mut var;
+ | ^^^ help: missing keyword: `let mut`
+
+error[E0308]: mismatched types
+ --> $DIR/issue-65257-invalid-var-decl-recovery.rs:20:33
+ |
+LL | let _recovery_witness: () = 0;
+ | -- ^ expected `()`, found integer
+ | |
+ | expected due to this
+
+error: aborting due to 7 previous errors
+
+For more information about this error, try `rustc --explain E0308`.