fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
1.6 KiB67 linesraw
1error: invalid variable declaration
2  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:2:5
3   |
4LL |     auto n = 0;
5   |     ^^^^
6   |
7help: write `let` instead of `auto` to introduce a new variable
8   |
9LL |     let n = 0;
10   |     ^^^
11
12error: invalid variable declaration
13  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:4:5
14   |
15LL |     auto m;
16   |     ^^^^
17   |
18help: write `let` instead of `auto` to introduce a new variable
19   |
20LL |     let m;
21   |     ^^^
22
23error: invalid variable declaration
24  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:8:5
25   |
26LL |     var n = 0;
27   |     ^^^
28   |
29help: write `let` instead of `var` to introduce a new variable
30   |
31LL |     let n = 0;
32   |     ^^^
33
34error: invalid variable declaration
35  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:10:5
36   |
37LL |     var m;
38   |     ^^^
39   |
40help: write `let` instead of `var` to introduce a new variable
41   |
42LL |     let m;
43   |     ^^^
44
45error: invalid variable declaration
46  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:14:5
47   |
48LL |     mut n = 0;
49   |     ^^^ help: missing keyword: `let mut`
50
51error: invalid variable declaration
52  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:16:5
53   |
54LL |     mut var;
55   |     ^^^ help: missing keyword: `let mut`
56
57error[E0308]: mismatched types
58  --> $DIR/issue-65257-invalid-var-decl-recovery.rs:20:33
59   |
60LL |     let _recovery_witness: () = 0;
61   |                            --   ^ expected `()`, found integer
62   |                            |
63   |                            expected due to this
64
65error: aborting due to 7 previous errors
66
67For more information about this error, try `rustc --explain E0308`.