diff options
Diffstat (limited to 'tests/ui/traits/bound/on-structs-and-enums.stderr')
-rw-r--r-- | tests/ui/traits/bound/on-structs-and-enums.stderr | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/tests/ui/traits/bound/on-structs-and-enums.stderr b/tests/ui/traits/bound/on-structs-and-enums.stderr new file mode 100644 index 000000000..fe05b8634 --- /dev/null +++ b/tests/ui/traits/bound/on-structs-and-enums.stderr @@ -0,0 +1,99 @@ +error[E0277]: the trait bound `T: Trait` is not satisfied + --> $DIR/on-structs-and-enums.rs:13:9 + | +LL | impl<T> Foo<T> { + | ^^^^^^ the trait `Trait` is not implemented for `T` + | +note: required by a bound in `Foo` + --> $DIR/on-structs-and-enums.rs:3:14 + | +LL | struct Foo<T:Trait> { + | ^^^^^ required by this bound in `Foo` +help: consider restricting type parameter `T` + | +LL | impl<T: Trait> Foo<T> { + | +++++++ + +error[E0277]: the trait bound `isize: Trait` is not satisfied + --> $DIR/on-structs-and-enums.rs:19:8 + | +LL | a: Foo<isize>, + | ^^^^^^^^^^ the trait `Trait` is not implemented for `isize` + | +note: required by a bound in `Foo` + --> $DIR/on-structs-and-enums.rs:3:14 + | +LL | struct Foo<T:Trait> { + | ^^^^^ required by this bound in `Foo` + +error[E0277]: the trait bound `usize: Trait` is not satisfied + --> $DIR/on-structs-and-enums.rs:23:10 + | +LL | Quux(Bar<usize>), + | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize` + | +note: required by a bound in `Bar` + --> $DIR/on-structs-and-enums.rs:7:12 + | +LL | enum Bar<T:Trait> { + | ^^^^^ required by this bound in `Bar` + +error[E0277]: the trait bound `U: Trait` is not satisfied + --> $DIR/on-structs-and-enums.rs:27:8 + | +LL | b: Foo<U>, + | ^^^^^^ the trait `Trait` is not implemented for `U` + | +note: required by a bound in `Foo` + --> $DIR/on-structs-and-enums.rs:3:14 + | +LL | struct Foo<T:Trait> { + | ^^^^^ required by this bound in `Foo` +help: consider restricting type parameter `U` + | +LL | struct Badness<U: Trait> { + | +++++++ + +error[E0277]: the trait bound `V: Trait` is not satisfied + --> $DIR/on-structs-and-enums.rs:31:21 + | +LL | EvenMoreBadness(Bar<V>), + | ^^^^^^ the trait `Trait` is not implemented for `V` + | +note: required by a bound in `Bar` + --> $DIR/on-structs-and-enums.rs:7:12 + | +LL | enum Bar<T:Trait> { + | ^^^^^ required by this bound in `Bar` +help: consider restricting type parameter `V` + | +LL | enum MoreBadness<V: Trait> { + | +++++++ + +error[E0277]: the trait bound `i32: Trait` is not satisfied + --> $DIR/on-structs-and-enums.rs:35:5 + | +LL | Foo<i32>, + | ^^^^^^^^ the trait `Trait` is not implemented for `i32` + | +note: required by a bound in `Foo` + --> $DIR/on-structs-and-enums.rs:3:14 + | +LL | struct Foo<T:Trait> { + | ^^^^^ required by this bound in `Foo` + +error[E0277]: the trait bound `u8: Trait` is not satisfied + --> $DIR/on-structs-and-enums.rs:39:29 + | +LL | DictionaryLike { field: Bar<u8> }, + | ^^^^^^^ the trait `Trait` is not implemented for `u8` + | +note: required by a bound in `Bar` + --> $DIR/on-structs-and-enums.rs:7:12 + | +LL | enum Bar<T:Trait> { + | ^^^^^ required by this bound in `Bar` + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0277`. |