fork/rust

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

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

master
1.2 KiB34 linesraw
1error: expected identifier, found `:`
2  --> $DIR/or-patterns-syntactic-fail.rs:11:19
3   |
4LL |     let _ = |A | B: E| ();
5   |                   ^ expected identifier
6   |
7   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
8
9error: top-level or-patterns are not allowed in function parameters
10  --> $DIR/or-patterns-syntactic-fail.rs:18:13
11   |
12LL |     fn fun1(A | B: E) {}
13   |             ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
14
15error: top-level or-patterns are not allowed in function parameters
16  --> $DIR/or-patterns-syntactic-fail.rs:21:13
17   |
18LL |     fn fun2(| A | B: E) {}
19   |             ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
20
21error: top-level or-patterns are not allowed in `let` bindings
22  --> $DIR/or-patterns-syntactic-fail.rs:26:9
23   |
24LL |     let A | B: E = A;
25   |         ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
26
27error: top-level or-patterns are not allowed in `let` bindings
28  --> $DIR/or-patterns-syntactic-fail.rs:29:9
29   |
30LL |     let | A | B: E = A;
31   |         ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
32
33error: aborting due to 5 previous errors
34