about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-12 18:25:55 +0000
committerbors <bors@rust-lang.org>2015-06-12 18:25:55 +0000
commit1671b9baeceeb38ddb7366668d28e3a7ee839ef3 (patch)
treea3093bc1dcc0bdb539d10ead1a07a57ad6e58a61 /src/test/compile-fail
parent4cc87c8acbc2eebf923b8ede73ea98ac361ea303 (diff)
parent793d9fcb5237f2148a7a40f2f17d4a8dcb6128cb (diff)
downloadrust-1671b9baeceeb38ddb7366668d28e3a7ee839ef3.tar.gz
rust-1671b9baeceeb38ddb7366668d28e3a7ee839ef3.zip
Auto merge of #26221 - sanxiyn:wf-span, r=arielb1
When checking field types of struct or enum definitions, use spans for field types instead of the entire item.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/trait-bounds-on-structs-and-enums.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs
index c18c5b386e8..c13f7346b11 100644
--- a/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs
+++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs
@@ -32,23 +32,27 @@ impl<T> Foo<T> {
 }
 
 struct Baz {
-//~^ ERROR not implemented
-    a: Foo<isize>,
+    a: Foo<isize>, //~ ERROR not implemented
 }
 
 enum Boo {
-//~^ ERROR not implemented
-    Quux(Bar<usize>),
+    Quux(Bar<usize>), //~ ERROR not implemented
 }
 
 struct Badness<U> {
-//~^ ERROR not implemented
-    b: Foo<U>,
+    b: Foo<U>, //~ ERROR not implemented
 }
 
 enum MoreBadness<V> {
-//~^ ERROR not implemented
-    EvenMoreBadness(Bar<V>),
+    EvenMoreBadness(Bar<V>), //~ ERROR not implemented
+}
+
+struct TupleLike(
+    Foo<i32>, //~ ERROR not implemented
+);
+
+enum Enum {
+    DictionaryLike { field: Bar<i32> }, //~ ERROR not implemented
 }
 
 trait PolyTrait<T>