about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-08-05 16:12:56 +0200
committerGitHub <noreply@github.com>2016-08-05 16:12:56 +0200
commitda981cf94ddcc8f51cfffa8122b59fafa8128cef (patch)
treedee652ecb259d3f8ce054280f3eb91f2706d9fa8 /src/test
parent9186db86fd209fa73e34cacb9155b024aef76c1f (diff)
parent7c58b26f704b60eaac2a872cb4a6268ad4d1a458 (diff)
downloadrust-da981cf94ddcc8f51cfffa8122b59fafa8128cef.tar.gz
rust-da981cf94ddcc8f51cfffa8122b59fafa8128cef.zip
Rollup merge of #35285 - razielgn:updated-e0071-to-new-format, r=jonathandturner
Updated E0071 to new format.

Bonus: the span underlines only the name of the thing that's not a struct rather than the whole expression.

Part of #35233.
Fixes #35220.

r? @jonathandturner
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/E0071.rs9
-rw-r--r--src/test/compile-fail/trait-as-struct-constructor.rs1
2 files changed, 8 insertions, 2 deletions
diff --git a/src/test/compile-fail/E0071.rs b/src/test/compile-fail/E0071.rs
index 658c8fb1551..6f0e55efffc 100644
--- a/src/test/compile-fail/E0071.rs
+++ b/src/test/compile-fail/E0071.rs
@@ -11,6 +11,11 @@
 enum Foo { FirstValue(i32) }
 
 fn main() {
-    let u = Foo::FirstValue { value: 0 }; //~ ERROR E0071
-    let t = u32 { value: 4 }; //~ ERROR E0071
+    let u = Foo::FirstValue { value: 0 };
+    //~^ ERROR `Foo::FirstValue` does not name a struct or a struct variant [E0071]
+    //~| NOTE not a struct
+
+    let t = u32 { value: 4 };
+    //~^ ERROR `u32` does not name a struct or a struct variant [E0071]
+    //~| NOTE not a struct
 }
diff --git a/src/test/compile-fail/trait-as-struct-constructor.rs b/src/test/compile-fail/trait-as-struct-constructor.rs
index 13fdaa302f7..c78eebddbfd 100644
--- a/src/test/compile-fail/trait-as-struct-constructor.rs
+++ b/src/test/compile-fail/trait-as-struct-constructor.rs
@@ -13,4 +13,5 @@ trait TraitNotAStruct {}
 fn main() {
     TraitNotAStruct{ value: 0 };
     //~^ ERROR: `TraitNotAStruct` does not name a struct or a struct variant [E0071]
+    //~| NOTE not a struct
 }