diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2021-08-25 14:40:06 -0700 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2021-08-25 14:40:06 -0700 |
| commit | 8a6501d28831d864a3af6adf2e0bd83a773062ed (patch) | |
| tree | 42571e65520484301d3061ff4e6724d5d08469bc /src/test/ui/destructuring-assignment | |
| parent | 19f45101e72ed6880b0fd1ebee73d74ea782c8c4 (diff) | |
| download | rust-8a6501d28831d864a3af6adf2e0bd83a773062ed.tar.gz rust-8a6501d28831d864a3af6adf2e0bd83a773062ed.zip | |
Adjust spans
* Highlight the whole pattern if it has no fields * Highlight the whole definition if it has no fields * Only highlight the pattern name if the pattern is multi-line * Determine whether a pattern is multi-line based on distance from name to last field, rather than first field
Diffstat (limited to 'src/test/ui/destructuring-assignment')
| -rw-r--r-- | src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr b/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr index 9a47ddf0479..9aae4b0a3fa 100644 --- a/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr +++ b/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr @@ -21,7 +21,7 @@ LL | struct TupleStruct<S, T>(S, T); | - - tuple struct has 2 fields ... LL | TupleStruct(a, a, b) = TupleStruct(1, 2); - | ----------- ^ ^ ^ expected 2 fields, found 3 + | ^ ^ ^ expected 2 fields, found 3 error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 2 fields --> $DIR/tuple_struct_destructure_fail.rs:32:17 @@ -30,7 +30,7 @@ LL | struct TupleStruct<S, T>(S, T); | - - tuple struct has 2 fields ... LL | TupleStruct(_) = TupleStruct(1, 2); - | ----------- ^ expected 2 fields, found 1 + | ^ expected 2 fields, found 1 | help: use `_` to explicitly ignore each field | @@ -48,7 +48,7 @@ LL | SingleVariant(S, T) | - - tuple variant has 2 fields ... LL | Enum::SingleVariant(a, a, b) = Enum::SingleVariant(1, 2); - | ------------------- ^ ^ ^ expected 2 fields, found 3 + | ^ ^ ^ expected 2 fields, found 3 error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields --> $DIR/tuple_struct_destructure_fail.rs:36:25 @@ -57,7 +57,7 @@ LL | SingleVariant(S, T) | - - tuple variant has 2 fields ... LL | Enum::SingleVariant(_) = Enum::SingleVariant(1, 2); - | ------------------- ^ expected 2 fields, found 1 + | ^ expected 2 fields, found 1 | help: use `_` to explicitly ignore each field | |
