X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fmissing-trait-bounds%2Fmissing-trait-bounds-for-method-call.stderr;h=f3c6b39e62ed0fc9b406edb56f2a7c21d394b230;hb=5fd37862d95a7fd898342e49ae5273edc8886b83;hp=2f0fd692a444a23648e85ed22d6bd9b692937842;hpb=aabaf8430c37c5bab7bb2f7f494bf30605f2a809;p=rust.git diff --git a/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr b/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr index 2f0fd692a44..f3c6b39e62e 100644 --- a/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr +++ b/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr @@ -7,11 +7,20 @@ LL | struct Foo { LL | self.foo(); | ^^^ method cannot be called on `&Foo` due to unsatisfied trait bounds | - = note: the following trait bounds were not satisfied: - `T: Default` - which is required by `Foo: Bar` - `T: Bar` - which is required by `Foo: Bar` +note: trait bound `T: Default` was not satisfied + --> $DIR/missing-trait-bounds-for-method-call.rs:10:9 + | +LL | impl Bar for Foo {} + | ^^^^^^^ --- ------ + | | + | unsatisfied trait bound introduced here +note: trait bound `T: Bar` was not satisfied + --> $DIR/missing-trait-bounds-for-method-call.rs:10:19 + | +LL | impl Bar for Foo {} + | ^^^ --- ------ + | | + | unsatisfied trait bound introduced here help: consider restricting the type parameters to satisfy the trait bounds | LL | struct Foo where T: Bar, T: Default { @@ -26,9 +35,13 @@ LL | struct Fin where T: Bar { LL | self.foo(); | ^^^ method cannot be called on `&Fin` due to unsatisfied trait bounds | - = note: the following trait bounds were not satisfied: - `T: Default` - which is required by `Fin: Bar` +note: trait bound `T: Default` was not satisfied + --> $DIR/missing-trait-bounds-for-method-call.rs:23:9 + | +LL | impl Bar for Fin {} + | ^^^^^^^ --- ------ + | | + | unsatisfied trait bound introduced here help: consider restricting the type parameter to satisfy the trait bound | LL | struct Fin where T: Bar, T: Default {