2021-02-12 18:04:37 -06:00
|
|
|
error: top-level or-patterns are not allowed in `let` bindings
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:19:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let b @ A | B: E = A;
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: wrap the pattern in parentheses
|
|
|
|
|
|
|
|
|
LL | let (b @ A | B): E = A;
|
|
|
|
| + +
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
error: top-level or-patterns are not allowed in `let` bindings
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:34:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &A(_) | B(_): F = A(3);
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: wrap the pattern in parentheses
|
|
|
|
|
|
|
|
|
LL | let (&A(_) | B(_)): F = A(3);
|
|
|
|
| + +
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
error: top-level or-patterns are not allowed in `let` bindings
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:36:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &&A(_) | B(_): F = A(3);
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: wrap the pattern in parentheses
|
|
|
|
|
|
|
|
|
LL | let (&&A(_) | B(_)): F = A(3);
|
|
|
|
| + +
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
error: top-level or-patterns are not allowed in `let` bindings
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:38:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &mut A(_) | B(_): F = A(3);
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: wrap the pattern in parentheses
|
|
|
|
|
|
|
|
|
LL | let (&mut A(_) | B(_)): F = A(3);
|
|
|
|
| + +
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
error: top-level or-patterns are not allowed in `let` bindings
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:40:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &&mut A(_) | B(_): F = A(3);
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: wrap the pattern in parentheses
|
|
|
|
|
|
|
|
|
LL | let (&&mut A(_) | B(_)): F = A(3);
|
|
|
|
| + +
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
error[E0408]: variable `b` is not bound in all patterns
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:19:17
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let b @ A | B: E = A;
|
|
|
|
| - ^ pattern doesn't bind `b`
|
|
|
|
| |
|
|
|
|
| variable not in all patterns
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:34:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &A(_) | B(_): F = A(3);
|
|
|
|
| ^^^^^ - expected due to this
|
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `F`, found `&_`
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
= note: expected enum `F`
|
|
|
|
found reference `&_`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:36:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &&A(_) | B(_): F = A(3);
|
|
|
|
| ^^^^^^ - expected due to this
|
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `F`, found `&_`
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
= note: expected enum `F`
|
|
|
|
found reference `&_`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:38:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &mut A(_) | B(_): F = A(3);
|
|
|
|
| ^^^^^^^^^ - expected due to this
|
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `F`, found `&mut _`
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
= note: expected enum `F`
|
|
|
|
found mutable reference `&mut _`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/nested-undelimited-precedence.rs:40:9
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
LL | let &&mut A(_) | B(_): F = A(3);
|
|
|
|
| ^^^^^^^^^^ - expected due to this
|
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `F`, found `&_`
|
2021-02-12 18:04:37 -06:00
|
|
|
|
|
|
|
|
= 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`.
|