diff options
| author | bors <bors@rust-lang.org> | 2018-12-31 20:56:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-31 20:56:19 +0000 |
| commit | 9eac386342c601b14311b435f2b6d314fc817bb5 (patch) | |
| tree | c7ccb9e9b2497adb98f75085eca41d388463a411 /src/test/ui/structs | |
| parent | 6efaef61899f6551914156f69809aa7d5854399d (diff) | |
| parent | dfc326d0e212bd644d04906ca21bb012cf970cb4 (diff) | |
| download | rust-9eac386342c601b14311b435f2b6d314fc817bb5.tar.gz rust-9eac386342c601b14311b435f2b6d314fc817bb5.zip | |
Auto merge of #57047 - euclio:field-structured-suggestions, r=estebank
use structured suggestions for nonexistent fields r? @estebank
Diffstat (limited to 'src/test/ui/structs')
| -rw-r--r-- | src/test/ui/structs/struct-fields-hints-no-dupe.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/structs/struct-fields-hints.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/structs/struct-fields-typo.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/structs/struct-fields-typo.stderr | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/test/ui/structs/struct-fields-hints-no-dupe.stderr b/src/test/ui/structs/struct-fields-hints-no-dupe.stderr index 105f330463a..1a88f269347 100644 --- a/src/test/ui/structs/struct-fields-hints-no-dupe.stderr +++ b/src/test/ui/structs/struct-fields-hints-no-dupe.stderr @@ -2,7 +2,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints-no-dupe.rs:10:9 | LL | bar : 42, - | ^^^ field does not exist - did you mean `barr`? + | ^^^ help: a field with a similar name exists: `barr` error: aborting due to previous error diff --git a/src/test/ui/structs/struct-fields-hints.stderr b/src/test/ui/structs/struct-fields-hints.stderr index d7130305631..3b8a2b5c7ba 100644 --- a/src/test/ui/structs/struct-fields-hints.stderr +++ b/src/test/ui/structs/struct-fields-hints.stderr @@ -2,7 +2,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints.rs:10:9 | LL | bar : 42, - | ^^^ field does not exist - did you mean `car`? + | ^^^ help: a field with a similar name exists: `car` error: aborting due to previous error diff --git a/src/test/ui/structs/struct-fields-typo.rs b/src/test/ui/structs/struct-fields-typo.rs index b435a0a4777..0e9b2ae5145 100644 --- a/src/test/ui/structs/struct-fields-typo.rs +++ b/src/test/ui/structs/struct-fields-typo.rs @@ -8,7 +8,8 @@ fn main() { foo: 0, bar: 0.5, }; - let x = foo.baa;//~ no field `baa` on type `BuildData` - //~^ did you mean `bar`? + let x = foo.baa; //~ ERROR no field `baa` on type `BuildData` + //~| HELP a field with a similar name exists + //~| SUGGESTION bar println!("{}", x); } diff --git a/src/test/ui/structs/struct-fields-typo.stderr b/src/test/ui/structs/struct-fields-typo.stderr index 93127ab5beb..c2fab714f7c 100644 --- a/src/test/ui/structs/struct-fields-typo.stderr +++ b/src/test/ui/structs/struct-fields-typo.stderr @@ -1,8 +1,8 @@ error[E0609]: no field `baa` on type `BuildData` --> $DIR/struct-fields-typo.rs:11:17 | -LL | let x = foo.baa;//~ no field `baa` on type `BuildData` - | ^^^ did you mean `bar`? +LL | let x = foo.baa; //~ ERROR no field `baa` on type `BuildData` + | ^^^ help: a field with a similar name exists: `bar` error: aborting due to previous error |
