]> git.lizzy.rs Git - rust.git/blob - src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr
Rollup merge of #80269 - pickfire:patch-4, r=joshtriplett
[rust.git] / src / test / ui / or-patterns / or-patterns-syntactic-fail.stderr
1 error: top-level or-patterns are not allowed in function parameters
2   --> $DIR/or-patterns-syntactic-fail.rs:15:13
3    |
4 LL |     fn fun1(A | B: E) {}
5    |             ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
6
7 error: top-level or-patterns are not allowed in function parameters
8   --> $DIR/or-patterns-syntactic-fail.rs:18:13
9    |
10 LL |     fn fun2(| A | B: E) {}
11    |             ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
12
13 error: top-level or-patterns are not allowed in `let` bindings
14   --> $DIR/or-patterns-syntactic-fail.rs:23:9
15    |
16 LL |     let A | B: E = A;
17    |         ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
18
19 error: top-level or-patterns are not allowed in `let` bindings
20   --> $DIR/or-patterns-syntactic-fail.rs:26:9
21    |
22 LL |     let | A | B: E = A;
23    |         ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
24
25 error[E0369]: no implementation for `E | ()`
26   --> $DIR/or-patterns-syntactic-fail.rs:11:22
27    |
28 LL |     let _ = |A | B: E| ();
29    |                  ----^ -- ()
30    |                  |
31    |                  E
32    |
33    = note: an implementation of `std::ops::BitOr` might be missing for `E`
34
35 error: aborting due to 5 previous errors
36
37 For more information about this error, try `rustc --explain E0369`.