1 error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
2 --> $DIR/inconsistent-modes.rs:6:26
4 LL | let (Ok(a) | Err(ref a)): Result<&u8, u8> = Ok(&0);
5 | - ^ bound in different ways
9 error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
10 --> $DIR/inconsistent-modes.rs:8:30
12 LL | let (Ok(ref mut a) | Err(a)): Result<u8, &mut u8> = Ok(0);
13 | - ^ bound in different ways
17 error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
18 --> $DIR/inconsistent-modes.rs:10:34
20 LL | let (Ok(ref a) | Err(ref mut a)): Result<&u8, &mut u8> = Ok(&0);
21 | - first binding ^ bound in different ways
23 error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
24 --> $DIR/inconsistent-modes.rs:13:40
26 LL | let (Ok((ref a, b)) | Err((ref mut a, ref b))) = Ok((0, &0));
27 | - first binding ^ bound in different ways
29 error[E0409]: variable `b` is bound inconsistently across alternatives separated by `|`
30 --> $DIR/inconsistent-modes.rs:13:47
32 LL | let (Ok((ref a, b)) | Err((ref mut a, ref b))) = Ok((0, &0));
33 | - first binding ^ bound in different ways
35 error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
36 --> $DIR/inconsistent-modes.rs:19:39
38 LL | let (Ok(Ok(a) | Err(a)) | Err(ref a)) = Err(0);
39 | - ^ bound in different ways
43 error[E0409]: variable `a` is bound inconsistently across alternatives separated by `|`
44 --> $DIR/inconsistent-modes.rs:23:34
46 LL | let (Ok([Ok((Ok(ref a) | Err(a),)) | Err(a)]) | Err(a)) = Err(&1);
47 | - ^ bound in different ways
51 error[E0308]: mismatched types
52 --> $DIR/inconsistent-modes.rs:10:26
54 LL | let (Ok(ref a) | Err(ref mut a)): Result<&u8, &mut u8> = Ok(&0);
55 | ----- ^^^^^^^^^ -------------------- expected due to this
57 | | types differ in mutability
58 | first introduced with type `&&u8` here
60 = note: expected type `&&u8`
61 found type `&mut &mut u8`
62 = note: a binding must have the same type in all alternatives
64 error[E0308]: mismatched types
65 --> $DIR/inconsistent-modes.rs:13:32
67 LL | let (Ok((ref a, b)) | Err((ref mut a, ref b))) = Ok((0, &0));
68 | ----- ^^^^^^^^^ ----------- this expression has type `Result<({integer}, &{integer}), (_, _)>`
70 | | types differ in mutability
71 | first introduced with type `&{integer}` here
73 = note: expected type `&{integer}`
75 = note: a binding must have the same type in all alternatives
77 error: aborting due to 9 previous errors
79 Some errors have detailed explanations: E0308, E0409.
80 For more information about an error, try `rustc --explain E0308`.