]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr
New upstream version 1.30.0~beta.7+dfsg1
[rustc.git] / src / test / ui / traits / trait-bounds-on-structs-and-enums-static.stderr
diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr b/src/test/ui/traits/trait-bounds-on-structs-and-enums-static.stderr
new file mode 100644 (file)
index 0000000..28d4257
--- /dev/null
@@ -0,0 +1,18 @@
+error[E0277]: the trait bound `usize: Trait` is not satisfied
+  --> $DIR/trait-bounds-on-structs-and-enums-static.rs:19:1
+   |
+LL | / static X: Foo<usize> = Foo {
+LL | | //~^ ERROR E0277
+LL | |     x: 1,
+LL | | };
+   | |__^ the trait `Trait` is not implemented for `usize`
+   |
+note: required by `Foo`
+  --> $DIR/trait-bounds-on-structs-and-enums-static.rs:15:1
+   |
+LL | struct Foo<T:Trait> {
+   | ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.