diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2021-06-21 19:07:19 -0700 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2021-08-11 09:46:24 +0000 |
| commit | 99f2977031706dfef6730764d359b9e5d0f673b4 (patch) | |
| tree | 16caa7ac1411f6ebe1e56c175e9799a442b59832 /src/test/ui/destructuring-assignment | |
| parent | d488de82f30fd1dcb0220d57498638596622394e (diff) | |
| download | rust-99f2977031706dfef6730764d359b9e5d0f673b4.tar.gz rust-99f2977031706dfef6730764d359b9e5d0f673b4.zip | |
Modify structured suggestion output
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
Diffstat (limited to 'src/test/ui/destructuring-assignment')
| -rw-r--r-- | src/test/ui/destructuring-assignment/struct_destructure_fail.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr b/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr index 8a83e145ea2..635bd5e7edf 100644 --- a/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr +++ b/src/test/ui/destructuring-assignment/struct_destructure_fail.stderr @@ -33,11 +33,11 @@ LL | Struct { a, _ } = Struct { a: 1, b: 2 }; help: include the missing field in the pattern | LL | Struct { a, b } = Struct { a: 1, b: 2 }; - | ^^^^^ + | ~~~~~ help: if you don't care about this missing field, you can explicitly ignore it | LL | Struct { a, .. } = Struct { a: 1, b: 2 }; - | ^^^^^^ + | ~~~~~~ error: aborting due to 5 previous errors 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 c270593cac7..0e92cc5c9f2 100644 --- a/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr +++ b/src/test/ui/destructuring-assignment/tuple_struct_destructure_fail.stderr @@ -35,11 +35,11 @@ LL | TupleStruct(_) = TupleStruct(1, 2); help: use `_` to explicitly ignore each field | LL | TupleStruct(_, _) = TupleStruct(1, 2); - | ^^^ + | +++ help: use `..` to ignore all fields | LL | TupleStruct(..) = TupleStruct(1, 2); - | ^^ + | ~~ error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields --> $DIR/tuple_struct_destructure_fail.rs:34:5 @@ -62,11 +62,11 @@ LL | Enum::SingleVariant(_) = Enum::SingleVariant(1, 2); help: use `_` to explicitly ignore each field | LL | Enum::SingleVariant(_, _) = Enum::SingleVariant(1, 2); - | ^^^ + | +++ help: use `..` to ignore all fields | LL | Enum::SingleVariant(..) = Enum::SingleVariant(1, 2); - | ^^ + | ~~ error[E0070]: invalid left-hand side of assignment --> $DIR/tuple_struct_destructure_fail.rs:40:12 |
