fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.7 KiB47 linesraw
1error[E0409]: variable `i` is bound in inconsistent ways within the same match arm
2  --> $DIR/resolve-inconsistent-binding-mode.rs:7:32
3   |
4LL |       Opts::A(ref i) | Opts::B(i) => {}
5   |                   -            ^ bound in different ways
6   |                   |
7   |                   first binding
8
9error[E0409]: variable `i` is bound in inconsistent ways within the same match arm
10  --> $DIR/resolve-inconsistent-binding-mode.rs:16:32
11   |
12LL |       Opts::A(ref i) | Opts::B(i) => {}
13   |                   -            ^ bound in different ways
14   |                   |
15   |                   first binding
16
17error[E0409]: variable `i` is bound in inconsistent ways within the same match arm
18  --> $DIR/resolve-inconsistent-binding-mode.rs:25:40
19   |
20LL |       Opts::A(ref mut i) | Opts::B(ref i) => {}
21   |                       - first binding  ^ bound in different ways
22
23error[E0308]: mismatched types
24  --> $DIR/resolve-inconsistent-binding-mode.rs:7:32
25   |
26LL |       Opts::A(ref i) | Opts::B(i) => {}
27   |                                ^ expected `&isize`, found `isize`
28
29error[E0308]: mismatched types
30  --> $DIR/resolve-inconsistent-binding-mode.rs:16:32
31   |
32LL |       Opts::A(ref i) | Opts::B(i) => {}
33   |                                ^ expected `&isize`, found `isize`
34
35error[E0308]: mismatched types
36  --> $DIR/resolve-inconsistent-binding-mode.rs:25:36
37   |
38LL |       Opts::A(ref mut i) | Opts::B(ref i) => {}
39   |                                    ^^^^^ types differ in mutability
40   |
41   = note: expected type `&mut isize`
42              found type `&isize`
43
44error: aborting due to 6 previous errors
45
46Some errors have detailed explanations: E0308, E0409.
47For more information about an error, try `rustc --explain E0308`.