]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/trait-bounds-on-structs-and-enums.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / trait-bounds-on-structs-and-enums.stderr
CommitLineData
b7449926 1error[E0277]: the trait bound `T: Trait` is not satisfied
0731742a 2 --> $DIR/trait-bounds-on-structs-and-enums.rs:13:9
b7449926 3 |
e1599b0c 4LL | struct Foo<T:Trait> {
ba9703b0 5 | ----- required by this bound in `Foo`
e1599b0c 6...
b7449926 7LL | impl<T> Foo<T> {
74b04a01
XL
8 | ^^^^^^ the trait `Trait` is not implemented for `T`
9 |
ba9703b0 10help: consider restricting type parameter `T`
74b04a01 11 |
ba9703b0
XL
12LL | impl<T: Trait> Foo<T> {
13 | ^^^^^^^
b7449926
XL
14
15error[E0277]: the trait bound `isize: Trait` is not satisfied
3dfed10e 16 --> $DIR/trait-bounds-on-structs-and-enums.rs:19:8
b7449926 17 |
e1599b0c 18LL | struct Foo<T:Trait> {
ba9703b0 19 | ----- required by this bound in `Foo`
e1599b0c 20...
532ac7d7 21LL | a: Foo<isize>,
3dfed10e 22 | ^^^^^^^^^^ the trait `Trait` is not implemented for `isize`
b7449926
XL
23
24error[E0277]: the trait bound `usize: Trait` is not satisfied
0731742a 25 --> $DIR/trait-bounds-on-structs-and-enums.rs:23:10
b7449926 26 |
e1599b0c 27LL | enum Bar<T:Trait> {
ba9703b0 28 | ----- required by this bound in `Bar`
e1599b0c 29...
532ac7d7 30LL | Quux(Bar<usize>),
b7449926 31 | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
b7449926
XL
32
33error[E0277]: the trait bound `U: Trait` is not satisfied
3dfed10e 34 --> $DIR/trait-bounds-on-structs-and-enums.rs:27:8
b7449926 35 |
e1599b0c 36LL | struct Foo<T:Trait> {
ba9703b0 37 | ----- required by this bound in `Foo`
e1599b0c 38...
532ac7d7 39LL | b: Foo<U>,
3dfed10e 40 | ^^^^^^ the trait `Trait` is not implemented for `U`
74b04a01 41 |
ba9703b0 42help: consider restricting type parameter `U`
74b04a01 43 |
ba9703b0
XL
44LL | struct Badness<U: Trait> {
45 | ^^^^^^^
b7449926
XL
46
47error[E0277]: the trait bound `V: Trait` is not satisfied
0731742a 48 --> $DIR/trait-bounds-on-structs-and-enums.rs:31:21
b7449926 49 |
e1599b0c 50LL | enum Bar<T:Trait> {
ba9703b0 51 | ----- required by this bound in `Bar`
e1599b0c 52...
532ac7d7 53LL | EvenMoreBadness(Bar<V>),
b7449926 54 | ^^^^^^ the trait `Trait` is not implemented for `V`
74b04a01 55 |
ba9703b0 56help: consider restricting type parameter `V`
74b04a01 57 |
ba9703b0
XL
58LL | enum MoreBadness<V: Trait> {
59 | ^^^^^^^
b7449926
XL
60
61error[E0277]: the trait bound `i32: Trait` is not satisfied
0731742a 62 --> $DIR/trait-bounds-on-structs-and-enums.rs:35:5
b7449926 63 |
e1599b0c 64LL | struct Foo<T:Trait> {
ba9703b0 65 | ----- required by this bound in `Foo`
e1599b0c 66...
532ac7d7 67LL | Foo<i32>,
b7449926 68 | ^^^^^^^^ the trait `Trait` is not implemented for `i32`
b7449926
XL
69
70error[E0277]: the trait bound `u8: Trait` is not satisfied
3dfed10e 71 --> $DIR/trait-bounds-on-structs-and-enums.rs:39:29
b7449926 72 |
e1599b0c 73LL | enum Bar<T:Trait> {
ba9703b0 74 | ----- required by this bound in `Bar`
e1599b0c 75...
532ac7d7 76LL | DictionaryLike { field: Bar<u8> },
3dfed10e 77 | ^^^^^^^ the trait `Trait` is not implemented for `u8`
b7449926
XL
78
79error: aborting due to 7 previous errors
80
81For more information about this error, try `rustc --explain E0277`.