about summary refs log tree commit diff
path: root/src/test/ui/structs
diff options
context:
space:
mode:
authorAndy Russell <arussell123@gmail.com>2018-12-20 18:10:46 -0500
committerAndy Russell <arussell123@gmail.com>2018-12-31 12:52:30 -0500
commitdfc326d0e212bd644d04906ca21bb012cf970cb4 (patch)
tree6e8e22597c6731a24a95d0201e6654b44000802f /src/test/ui/structs
parent79d8a0fcefa5134db2a94739b1d18daa01fc6e9f (diff)
downloadrust-dfc326d0e212bd644d04906ca21bb012cf970cb4.tar.gz
rust-dfc326d0e212bd644d04906ca21bb012cf970cb4.zip
use structured suggestions for nonexistent fields
Diffstat (limited to 'src/test/ui/structs')
-rw-r--r--src/test/ui/structs/struct-fields-hints-no-dupe.stderr2
-rw-r--r--src/test/ui/structs/struct-fields-hints.stderr2
-rw-r--r--src/test/ui/structs/struct-fields-typo.rs5
-rw-r--r--src/test/ui/structs/struct-fields-typo.stderr4
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