mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
c63b6a437e
My type ascription Oh rip it out Ah If you think we live too much then You can sacrifice diagnostics Don't mix your garbage Into my syntax So many weird hacks keep diagnostics alive Yet I don't even step outside So many bad diagnostics keep tyasc alive Yet tyasc doesn't even bother to survive!
34 lines
1.2 KiB
Text
34 lines
1.2 KiB
Text
error: expected identifier, found `:`
|
|
--> $DIR/or-patterns-syntactic-fail.rs:11:19
|
|
|
|
|
LL | let _ = |A | B: E| ();
|
|
| ^ expected identifier
|
|
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
|
|
|
error: top-level or-patterns are not allowed in function parameters
|
|
--> $DIR/or-patterns-syntactic-fail.rs:18:13
|
|
|
|
|
LL | fn fun1(A | B: E) {}
|
|
| ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
|
|
|
|
error: top-level or-patterns are not allowed in function parameters
|
|
--> $DIR/or-patterns-syntactic-fail.rs:21:13
|
|
|
|
|
LL | fn fun2(| A | B: E) {}
|
|
| ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
|
|
|
|
error: top-level or-patterns are not allowed in `let` bindings
|
|
--> $DIR/or-patterns-syntactic-fail.rs:26:9
|
|
|
|
|
LL | let A | B: E = A;
|
|
| ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
|
|
|
|
error: top-level or-patterns are not allowed in `let` bindings
|
|
--> $DIR/or-patterns-syntactic-fail.rs:29:9
|
|
|
|
|
LL | let | A | B: E = A;
|
|
| ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|