]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr
Reword label as per review comment
[rust.git] / src / test / ui / resolve / resolve-inconsistent-binding-mode.stderr
1 error[E0409]: variable `i` is bound in inconsistent ways within the same match arm
2   --> $DIR/resolve-inconsistent-binding-mode.rs:7:32
3    |
4 LL |       Opts::A(ref i) | Opts::B(i) => {}
5    |                   -            ^ bound in different ways
6    |                   |
7    |                   first binding
8
9 error[E0409]: variable `i` is bound in inconsistent ways within the same match arm
10   --> $DIR/resolve-inconsistent-binding-mode.rs:16:32
11    |
12 LL |       Opts::A(ref i) | Opts::B(i) => {}
13    |                   -            ^ bound in different ways
14    |                   |
15    |                   first binding
16
17 error[E0409]: variable `i` is bound in inconsistent ways within the same match arm
18   --> $DIR/resolve-inconsistent-binding-mode.rs:25:40
19    |
20 LL |       Opts::A(ref mut i) | Opts::B(ref i) => {}
21    |                       - first binding  ^ bound in different ways
22
23 error[E0308]: mismatched types
24   --> $DIR/resolve-inconsistent-binding-mode.rs:7:32
25    |
26 LL |     match x {
27    |           - this match expression has type `_`
28 LL |       Opts::A(ref i) | Opts::B(i) => {}
29    |                                ^ expected &isize, found isize
30    |
31    = note: expected type `&isize`
32               found type `isize`
33
34 error[E0308]: mismatched types
35   --> $DIR/resolve-inconsistent-binding-mode.rs:16:32
36    |
37 LL |     match x {
38    |           - this match expression has type `_`
39 LL |       Opts::A(ref i) | Opts::B(i) => {}
40    |                                ^ expected &isize, found isize
41    |
42    = note: expected type `&isize`
43               found type `isize`
44
45 error[E0308]: mismatched types
46   --> $DIR/resolve-inconsistent-binding-mode.rs:25:36
47    |
48 LL |     match x {
49    |           - this match expression has type `_`
50 LL |       Opts::A(ref mut i) | Opts::B(ref i) => {}
51    |                                    ^^^^^ types differ in mutability
52    |
53    = note: expected type `&mut isize`
54               found type `&isize`
55
56 error: aborting due to 6 previous errors
57
58 Some errors occurred: E0308, E0409.
59 For more information about an error, try `rustc --explain E0308`.