mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 03:58:14 +00:00
When encountering an unmet trait bound, point at local type that doesn't implement the trait: ``` error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied --> $DIR/issue-64855.rs:9:19 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `Foo` is not implemented for `Bar<T>` --> $DIR/issue-64855.rs:9:1 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^ ```
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
error[E0277]: the trait bound `Forbidden: SyncDrop` is not satisfied
|
|
--> $DIR/default-bounds.rs:43:9
|
|
|
|
|
LL | bar(Forbidden);
|
|
| --- ^^^^^^^^^ unsatisfied trait bound
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
help: the trait `SyncDrop` is not implemented for `Forbidden`
|
|
--> $DIR/default-bounds.rs:32:1
|
|
|
|
|
LL | struct Forbidden;
|
|
| ^^^^^^^^^^^^^^^^
|
|
note: required by a bound in `bar`
|
|
--> $DIR/default-bounds.rs:39:8
|
|
|
|
|
LL | fn bar<T: Leak>(_: T) {}
|
|
| ^ required by this bound in `bar`
|
|
|
|
error[E0277]: the trait bound `Forbidden: Leak` is not satisfied
|
|
--> $DIR/default-bounds.rs:43:9
|
|
|
|
|
LL | bar(Forbidden);
|
|
| --- ^^^^^^^^^ unsatisfied trait bound
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
help: the trait `Leak` is not implemented for `Forbidden`
|
|
--> $DIR/default-bounds.rs:32:1
|
|
|
|
|
LL | struct Forbidden;
|
|
| ^^^^^^^^^^^^^^^^
|
|
note: required by a bound in `bar`
|
|
--> $DIR/default-bounds.rs:39:11
|
|
|
|
|
LL | fn bar<T: Leak>(_: T) {}
|
|
| ^^^^ required by this bound in `bar`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|