summary refs log tree commit diff
path: root/src/test/ui/or-patterns/inconsistent-modes.stderr
blob: 0a36ed5548e5b7f6e3a04d5a4960fa5944ce938e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
  --> $DIR/inconsistent-modes.rs:9:25
   |
LL |     let Ok(a) | Err(ref a): Result<&u8, u8> = Ok(&0);
   |            -            ^ bound in different ways
   |            |
   |            first binding

error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
  --> $DIR/inconsistent-modes.rs:11:29
   |
LL |     let Ok(ref mut a) | Err(a): Result<u8, &mut u8> = Ok(0);
   |                    -        ^ bound in different ways
   |                    |
   |                    first binding

error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
  --> $DIR/inconsistent-modes.rs:13:33
   |
LL |     let Ok(ref a) | Err(ref mut a): Result<&u8, &mut u8> = Ok(&0);
   |                - first binding  ^ bound in different ways

error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
  --> $DIR/inconsistent-modes.rs:16:39
   |
LL |     let Ok((ref a, b)) | Err((ref mut a, ref b)) = Ok((0, &0));
   |                 - first binding       ^ bound in different ways

error[E0409]: variable `b` is bound in inconsistent ways within the same match arm
  --> $DIR/inconsistent-modes.rs:16:46
   |
LL |     let Ok((ref a, b)) | Err((ref mut a, ref b)) = Ok((0, &0));
   |                    - first binding           ^ bound in different ways

error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
  --> $DIR/inconsistent-modes.rs:22:38
   |
LL |     let Ok(Ok(a) | Err(a)) | Err(ref a) = Err(0);
   |                        -             ^ bound in different ways
   |                        |
   |                        first binding

error[E0409]: variable `a` is bound in inconsistent ways within the same match arm
  --> $DIR/inconsistent-modes.rs:26:34
   |
LL |     let Ok([ Ok((Ok(ref a) | Err(a),)) | Err(a) ]) | Err(a) = Err(&1);
   |                         -        ^ bound in different ways
   |                         |
   |                         first binding

warning: the feature `or_patterns` is incomplete and may cause the compiler to crash
  --> $DIR/inconsistent-modes.rs:3:12
   |
LL | #![feature(or_patterns)]
   |            ^^^^^^^^^^^
   |
   = note: `#[warn(incomplete_features)]` on by default

error[E0308]: mismatched types
  --> $DIR/inconsistent-modes.rs:13:25
   |
LL |     let Ok(ref a) | Err(ref mut a): Result<&u8, &mut u8> = Ok(&0);
   |                         ^^^^^^^^^ types differ in mutability
   |
   = note: expected type `&&u8`
              found type `&mut &mut u8`

error[E0308]: mismatched types
  --> $DIR/inconsistent-modes.rs:16:31
   |
LL |     let Ok((ref a, b)) | Err((ref mut a, ref b)) = Ok((0, &0));
   |                               ^^^^^^^^^ types differ in mutability
   |
   = note: expected type `&{integer}`
              found type `&mut _`

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0308, E0409.
For more information about an error, try `rustc --explain E0308`.