fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.8 KiB86 linesraw
1error: top-level or-patterns are not allowed in `let` bindings
2  --> $DIR/nested-undelimited-precedence.rs:19:9
3   |
4LL |     let b @ A | B: E = A;
5   |         ^^^^^^^^^ help: wrap the pattern in parentheses: `(b @ A | B)`
6
7error: top-level or-patterns are not allowed in `let` bindings
8  --> $DIR/nested-undelimited-precedence.rs:34:9
9   |
10LL |     let &A(_) | B(_): F = A(3);
11   |         ^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&A(_) | B(_))`
12
13error: top-level or-patterns are not allowed in `let` bindings
14  --> $DIR/nested-undelimited-precedence.rs:36:9
15   |
16LL |     let &&A(_) | B(_): F = A(3);
17   |         ^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&&A(_) | B(_))`
18
19error: top-level or-patterns are not allowed in `let` bindings
20  --> $DIR/nested-undelimited-precedence.rs:38:9
21   |
22LL |     let &mut A(_) | B(_): F = A(3);
23   |         ^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&mut A(_) | B(_))`
24
25error: top-level or-patterns are not allowed in `let` bindings
26  --> $DIR/nested-undelimited-precedence.rs:40:9
27   |
28LL |     let &&mut A(_) | B(_): F = A(3);
29   |         ^^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(&&mut A(_) | B(_))`
30
31error[E0408]: variable `b` is not bound in all patterns
32  --> $DIR/nested-undelimited-precedence.rs:19:17
33   |
34LL |     let b @ A | B: E = A;
35   |         -       ^ pattern doesn't bind `b`
36   |         |
37   |         variable not in all patterns
38
39error[E0308]: mismatched types
40  --> $DIR/nested-undelimited-precedence.rs:34:9
41   |
42LL |     let &A(_) | B(_): F = A(3);
43   |         ^^^^^         - expected due to this
44   |         |
45   |         expected `F`, found `&_`
46   |
47   = note:   expected enum `F`
48           found reference `&_`
49
50error[E0308]: mismatched types
51  --> $DIR/nested-undelimited-precedence.rs:36:9
52   |
53LL |     let &&A(_) | B(_): F = A(3);
54   |         ^^^^^^         - expected due to this
55   |         |
56   |         expected `F`, found `&_`
57   |
58   = note:   expected enum `F`
59           found reference `&_`
60
61error[E0308]: mismatched types
62  --> $DIR/nested-undelimited-precedence.rs:38:9
63   |
64LL |     let &mut A(_) | B(_): F = A(3);
65   |         ^^^^^^^^^         - expected due to this
66   |         |
67   |         expected `F`, found `&mut _`
68   |
69   = note:           expected enum `F`
70           found mutable reference `&mut _`
71
72error[E0308]: mismatched types
73  --> $DIR/nested-undelimited-precedence.rs:40:9
74   |
75LL |     let &&mut A(_) | B(_): F = A(3);
76   |         ^^^^^^^^^^         - expected due to this
77   |         |
78   |         expected `F`, found `&_`
79   |
80   = note:   expected enum `F`
81           found reference `&_`
82
83error: aborting due to 10 previous errors
84
85Some errors have detailed explanations: E0308, E0408.
86For more information about an error, try `rustc --explain E0308`.