mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
692bc344d5
Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
281 lines
6.2 KiB
Plaintext
281 lines
6.2 KiB
Plaintext
error: top-level or-patterns are not allowed in function parameters
|
|
--> $DIR/remove-leading-vert.rs:11:14
|
|
|
|
|
LL | fn fun1( | A: E) {}
|
|
| ^^^
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - fn fun1( | A: E) {}
|
|
LL + fn fun1( A: E) {}
|
|
|
|
|
|
|
error: unexpected `||` before function parameter
|
|
--> $DIR/remove-leading-vert.rs:12:14
|
|
|
|
|
LL | fn fun2( || A: E) {}
|
|
| ^^
|
|
|
|
|
= note: alternatives in or-patterns are separated with `|`, not `||`
|
|
help: remove the `||`
|
|
|
|
|
LL - fn fun2( || A: E) {}
|
|
LL + fn fun2( A: E) {}
|
|
|
|
|
|
|
error: unexpected token `||` in pattern
|
|
--> $DIR/remove-leading-vert.rs:14:11
|
|
|
|
|
LL | let ( || A): (E);
|
|
| ^^
|
|
|
|
|
help: use a single `|` to separate multiple alternative patterns
|
|
|
|
|
LL | let ( | A): (E);
|
|
| ~
|
|
|
|
error: unexpected token `||` in pattern
|
|
--> $DIR/remove-leading-vert.rs:17:11
|
|
|
|
|
LL | let [ || A ]: [E; 1];
|
|
| ^^
|
|
|
|
|
help: use a single `|` to separate multiple alternative patterns
|
|
|
|
|
LL | let [ | A ]: [E; 1];
|
|
| ~
|
|
|
|
error: unexpected token `||` in pattern
|
|
--> $DIR/remove-leading-vert.rs:19:13
|
|
|
|
|
LL | let TS( || A ): TS;
|
|
| ^^
|
|
|
|
|
help: use a single `|` to separate multiple alternative patterns
|
|
|
|
|
LL | let TS( | A ): TS;
|
|
| ~
|
|
|
|
error: unexpected token `||` in pattern
|
|
--> $DIR/remove-leading-vert.rs:21:17
|
|
|
|
|
LL | let NS { f: || A }: NS;
|
|
| ^^
|
|
|
|
|
help: use a single `|` to separate multiple alternative patterns
|
|
|
|
|
LL | let NS { f: | A }: NS;
|
|
| ~
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:26:13
|
|
|
|
|
LL | let ( A | ): E;
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let ( A | ): E;
|
|
LL + let ( A ): E;
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:27:12
|
|
|
|
|
LL | let (a |,): (E,);
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let (a |,): (E,);
|
|
LL + let (a ,): (E,);
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:28:17
|
|
|
|
|
LL | let ( A | B | ): E;
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let ( A | B | ): E;
|
|
LL + let ( A | B ): E;
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:29:17
|
|
|
|
|
LL | let [ A | B | ]: [E; 1];
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let [ A | B | ]: [E; 1];
|
|
LL + let [ A | B ]: [E; 1];
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:30:18
|
|
|
|
|
LL | let S { f: B | };
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let S { f: B | };
|
|
LL + let S { f: B };
|
|
|
|
|
|
|
error: unexpected token `||` in pattern
|
|
--> $DIR/remove-leading-vert.rs:31:13
|
|
|
|
|
LL | let ( A || B | ): E;
|
|
| - ^^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: use a single `|` to separate multiple alternative patterns
|
|
|
|
|
LL | let ( A | B | ): E;
|
|
| ~
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:31:18
|
|
|
|
|
LL | let ( A || B | ): E;
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let ( A || B | ): E;
|
|
LL + let ( A || B ): E;
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:34:11
|
|
|
|
|
LL | A | => {}
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - A | => {}
|
|
LL + A => {}
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:35:11
|
|
|
|
|
LL | A || => {}
|
|
| - ^^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
= note: alternatives in or-patterns are separated with `|`, not `||`
|
|
help: remove the `||`
|
|
|
|
|
LL - A || => {}
|
|
LL + A => {}
|
|
|
|
|
|
|
error: unexpected token `||` in pattern
|
|
--> $DIR/remove-leading-vert.rs:36:11
|
|
|
|
|
LL | A || B | => {}
|
|
| - ^^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: use a single `|` to separate multiple alternative patterns
|
|
|
|
|
LL | A | B | => {}
|
|
| ~
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:36:16
|
|
|
|
|
LL | A || B | => {}
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - A || B | => {}
|
|
LL + A || B => {}
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:38:17
|
|
|
|
|
LL | | A | B | => {}
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - | A | B | => {}
|
|
LL + | A | B => {}
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:45:11
|
|
|
|
|
LL | let a | : u8 = 0;
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let a | : u8 = 0;
|
|
LL + let a : u8 = 0;
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:46:11
|
|
|
|
|
LL | let a | = 0;
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let a | = 0;
|
|
LL + let a = 0;
|
|
|
|
|
|
|
error: a trailing `|` is not allowed in an or-pattern
|
|
--> $DIR/remove-leading-vert.rs:47:11
|
|
|
|
|
LL | let a | ;
|
|
| - ^
|
|
| |
|
|
| while parsing this or-pattern starting here
|
|
|
|
|
help: remove the `|`
|
|
|
|
|
LL - let a | ;
|
|
LL + let a ;
|
|
|
|
|
|
|
error: aborting due to 21 previous errors
|
|
|