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