diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-06 03:07:46 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-07-12 03:02:57 +0000 |
| commit | 692bc344d55cf9d86c60b06c92a70684d013c89f (patch) | |
| tree | 4ab084f04f99c13c3a5e84aeb405867bc3319f96 /tests/ui/or-patterns/or-patterns-syntactic-fail.stderr | |
| parent | 5e311f933d844b6922256a0c0aa49b86159534f5 (diff) | |
| download | rust-692bc344d55cf9d86c60b06c92a70684d013c89f.tar.gz rust-692bc344d55cf9d86c60b06c92a70684d013c89f.zip | |
Make parse error suggestions verbose and fix spans
Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
Diffstat (limited to 'tests/ui/or-patterns/or-patterns-syntactic-fail.stderr')
| -rw-r--r-- | tests/ui/or-patterns/or-patterns-syntactic-fail.stderr | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr index e09194d5d39..5608138078f 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr +++ b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr @@ -16,25 +16,45 @@ 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)` + | ^^^^^ + | +help: wrap the pattern in parentheses + | +LL | fn fun1((A | B): E) {} + | + + 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)` + | ^^^^^^^ + | +help: wrap the pattern in parentheses + | +LL | fn fun2((| A | B): E) {} + | + + 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)` + | ^^^^^ + | +help: wrap the pattern in parentheses + | +LL | let (A | B): E = A; + | + + 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)` + | ^^^^^^^ + | +help: wrap the pattern in parentheses + | +LL | let (| A | B): E = A; + | + + error: aborting due to 5 previous errors |
