summaryrefslogtreecommitdiffstats
path: root/tests/ui/or-patterns/nested-undelimited-precedence.stderr
blob: 5a63e621f4a3ac8dea6ff2d5d313b685d12647ad (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
81
82
83
84
85
86
error: top-level or-patterns are not allowed in `let` bindings
  --> $DIR/nested-undelimited-precedence.rs:19:9
   |
LL |     let b @ A | B: E = A;
   |         ^^^^^^^^^ help: wrap the pattern in parentheses: `(b @ A | B)`

error: top-level or-patterns are not allowed in `let` bindings
  --> $DIR/nested-undelimited-precedence.rs:34:9
   |
LL |     let &A(_) | B(_): F = A(3);
   |         ^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&A(_) | B(_))`

error: top-level or-patterns are not allowed in `let` bindings
  --> $DIR/nested-undelimited-precedence.rs:36:9
   |
LL |     let &&A(_) | B(_): F = A(3);
   |         ^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&&A(_) | B(_))`

error: top-level or-patterns are not allowed in `let` bindings
  --> $DIR/nested-undelimited-precedence.rs:38:9
   |
LL |     let &mut A(_) | B(_): F = A(3);
   |         ^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&mut A(_) | B(_))`

error: top-level or-patterns are not allowed in `let` bindings
  --> $DIR/nested-undelimited-precedence.rs:40:9
   |
LL |     let &&mut A(_) | B(_): F = A(3);
   |         ^^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&&mut A(_) | B(_))`

error[E0408]: variable `b` is not bound in all patterns
  --> $DIR/nested-undelimited-precedence.rs:19:17
   |
LL |     let b @ A | B: E = A;
   |         -       ^ pattern doesn't bind `b`
   |         |
   |         variable not in all patterns

error[E0308]: mismatched types
  --> $DIR/nested-undelimited-precedence.rs:34:9
   |
LL |     let &A(_) | B(_): F = A(3);
   |         ^^^^^         - expected due to this
   |         |
   |         expected `F`, found `&_`
   |
   = note:   expected enum `F`
           found reference `&_`

error[E0308]: mismatched types
  --> $DIR/nested-undelimited-precedence.rs:36:9
   |
LL |     let &&A(_) | B(_): F = A(3);
   |         ^^^^^^         - expected due to this
   |         |
   |         expected `F`, found `&_`
   |
   = note:   expected enum `F`
           found reference `&_`

error[E0308]: mismatched types
  --> $DIR/nested-undelimited-precedence.rs:38:9
   |
LL |     let &mut A(_) | B(_): F = A(3);
   |         ^^^^^^^^^         - expected due to this
   |         |
   |         expected `F`, found `&mut _`
   |
   = note:           expected enum `F`
           found mutable reference `&mut _`

error[E0308]: mismatched types
  --> $DIR/nested-undelimited-precedence.rs:40:9
   |
LL |     let &&mut A(_) | B(_): F = A(3);
   |         ^^^^^^^^^^         - expected due to this
   |         |
   |         expected `F`, found `&_`
   |
   = note:   expected enum `F`
           found reference `&_`

error: aborting due to 10 previous errors

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