summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/bound/on-structs-and-enums-static.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/bound/on-structs-and-enums-static.rs')
-rw-r--r--tests/ui/traits/bound/on-structs-and-enums-static.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/traits/bound/on-structs-and-enums-static.rs b/tests/ui/traits/bound/on-structs-and-enums-static.rs
new file mode 100644
index 000000000..df3f8b8a5
--- /dev/null
+++ b/tests/ui/traits/bound/on-structs-and-enums-static.rs
@@ -0,0 +1,15 @@
+trait Trait {
+ fn dummy(&self) { }
+}
+
+struct Foo<T:Trait> {
+ x: T,
+}
+
+static X: Foo<usize> = Foo {
+//~^ ERROR E0277
+ x: 1,
+};
+
+fn main() {
+}