|
| 1 | +error[E0277]: the trait bound `T: Wf` is not satisfied |
| 2 | + --> $DIR/bad-wf-when-selecting-method.rs:12:13 |
| 3 | + | |
| 4 | +LL | Wrapper(t).needs_sized(); |
| 5 | + | ------- ^ the trait `Wf` is not implemented for `T` |
| 6 | + | | |
| 7 | + | required by a bound introduced by this call |
| 8 | + | |
| 9 | +note: required by a bound in `Wrapper` |
| 10 | + --> $DIR/bad-wf-when-selecting-method.rs:5:19 |
| 11 | + | |
| 12 | +LL | struct Wrapper<T: Wf<Assoc = U>, U>(T); |
| 13 | + | ^^^^^^^^^^^^^ required by this bound in `Wrapper` |
| 14 | +help: consider restricting type parameter `T` with trait `Wf` |
| 15 | + | |
| 16 | +LL | fn test<T: Wf>(t: T) { |
| 17 | + | ++++ |
| 18 | + |
| 19 | +error[E0277]: the trait bound `T: Wf` is not satisfied |
| 20 | + --> $DIR/bad-wf-when-selecting-method.rs:12:5 |
| 21 | + | |
| 22 | +LL | Wrapper(t).needs_sized(); |
| 23 | + | ^^^^^^^^^^ the trait `Wf` is not implemented for `T` |
| 24 | + | |
| 25 | +note: required by a bound in `Wrapper` |
| 26 | + --> $DIR/bad-wf-when-selecting-method.rs:5:19 |
| 27 | + | |
| 28 | +LL | struct Wrapper<T: Wf<Assoc = U>, U>(T); |
| 29 | + | ^^^^^^^^^^^^^ required by this bound in `Wrapper` |
| 30 | +help: consider restricting type parameter `T` with trait `Wf` |
| 31 | + | |
| 32 | +LL | fn test<T: Wf>(t: T) { |
| 33 | + | ++++ |
| 34 | + |
| 35 | +error[E0599]: the method `needs_sized` exists for struct `Wrapper<T, _>`, but its trait bounds were not satisfied |
| 36 | + --> $DIR/bad-wf-when-selecting-method.rs:12:16 |
| 37 | + | |
| 38 | +LL | struct Wrapper<T: Wf<Assoc = U>, U>(T); |
| 39 | + | ----------------------------------- method `needs_sized` not found for this struct |
| 40 | +... |
| 41 | +LL | Wrapper(t).needs_sized(); |
| 42 | + | ^^^^^^^^^^^ method cannot be called on `Wrapper<T, _>` due to unsatisfied trait bounds |
| 43 | + | |
| 44 | + = note: the following trait bounds were not satisfied: |
| 45 | + `T: Wf` |
| 46 | +help: consider restricting the type parameter to satisfy the trait bound |
| 47 | + | |
| 48 | +LL | fn test<T>(t: T) where T: Wf { |
| 49 | + | +++++++++++ |
| 50 | + |
| 51 | +error: aborting due to 3 previous errors |
| 52 | + |
| 53 | +Some errors have detailed explanations: E0277, E0599. |
| 54 | +For more information about an error, try `rustc --explain E0277`. |
0 commit comments