1 error[E0599]: the method `foo` exists for reference `&Foo<T>`, but its trait bounds were not satisfied
2 --> $DIR/missing-trait-bounds-for-method-call.rs:14:14
5 | ------------- doesn't satisfy `Foo<T>: Bar`
8 | ^^^ method cannot be called on `&Foo<T>` due to unsatisfied trait bounds
10 note: trait bound `T: Default` was not satisfied
11 --> $DIR/missing-trait-bounds-for-method-call.rs:10:9
13 LL | impl<T: Default + Bar> Bar for Foo<T> {}
16 | unsatisfied trait bound introduced here
17 note: trait bound `T: Bar` was not satisfied
18 --> $DIR/missing-trait-bounds-for-method-call.rs:10:19
20 LL | impl<T: Default + Bar> Bar for Foo<T> {}
23 | unsatisfied trait bound introduced here
24 help: consider restricting the type parameters to satisfy the trait bounds
26 LL | struct Foo<T> where T: Bar, T: Default {
27 | ++++++++++++++++++++++++
29 error[E0599]: the method `foo` exists for reference `&Fin<T>`, but its trait bounds were not satisfied
30 --> $DIR/missing-trait-bounds-for-method-call.rs:27:14
32 LL | struct Fin<T> where T: Bar {
33 | -------------------------- doesn't satisfy `Fin<T>: Bar`
36 | ^^^ method cannot be called on `&Fin<T>` due to unsatisfied trait bounds
38 note: trait bound `T: Default` was not satisfied
39 --> $DIR/missing-trait-bounds-for-method-call.rs:23:9
41 LL | impl<T: Default + Bar> Bar for Fin<T> {}
44 | unsatisfied trait bound introduced here
45 help: consider restricting the type parameter to satisfy the trait bound
47 LL | struct Fin<T> where T: Bar, T: Default {
50 error: aborting due to 2 previous errors
52 For more information about this error, try `rustc --explain E0599`.