6efddac288
Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote: ``` error[E0277]: the trait bound `i32: Bar` is not satisfied --> f100.rs:6:6 | 6 | <i32 as Foo>::foo(); | ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo` | help: this trait has no implementations, consider adding one --> f100.rs:2:1 | 2 | trait Bar {} | ^^^^^^^^^ note: required for `i32` to implement `Foo` --> f100.rs:3:14 | 3 | impl<T: Bar> Foo for T {} | --- ^^^ ^ | | | unsatisfied trait bound introduced here ``` Fix #40120.
85 lines
3.3 KiB
Plaintext
85 lines
3.3 KiB
Plaintext
error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
|
|
--> $DIR/issue-89118.rs:19:8
|
|
|
|
|
LL | C: StackContext,
|
|
| ^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
|
|
|
|
help: this trait has no implementations, consider adding one
|
|
--> $DIR/issue-89118.rs:1:1
|
|
|
|
|
LL | trait BufferMut {}
|
|
| ^^^^^^^^^^^^^^^
|
|
note: required for `Ctx<()>` to implement `for<'a> BufferUdpStateContext<&'a ()>`
|
|
--> $DIR/issue-89118.rs:5:23
|
|
|
|
|
LL | impl<B: BufferMut, C> BufferUdpStateContext<B> for C {}
|
|
| --------- ^^^^^^^^^^^^^^^^^^^^^^^^ ^
|
|
| |
|
|
| unsatisfied trait bound introduced here
|
|
note: required by a bound in `StackContext`
|
|
--> $DIR/issue-89118.rs:9:14
|
|
|
|
|
LL | trait StackContext
|
|
| ------------ required by a bound in this trait
|
|
LL | where
|
|
LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>,
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StackContext`
|
|
|
|
error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
|
|
--> $DIR/issue-89118.rs:29:9
|
|
|
|
|
LL | impl<C> EthernetWorker<C> {}
|
|
| ^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
|
|
|
|
help: this trait has no implementations, consider adding one
|
|
--> $DIR/issue-89118.rs:1:1
|
|
|
|
|
LL | trait BufferMut {}
|
|
| ^^^^^^^^^^^^^^^
|
|
note: required for `Ctx<()>` to implement `for<'a> BufferUdpStateContext<&'a ()>`
|
|
--> $DIR/issue-89118.rs:5:23
|
|
|
|
|
LL | impl<B: BufferMut, C> BufferUdpStateContext<B> for C {}
|
|
| --------- ^^^^^^^^^^^^^^^^^^^^^^^^ ^
|
|
| |
|
|
| unsatisfied trait bound introduced here
|
|
note: required by a bound in `EthernetWorker`
|
|
--> $DIR/issue-89118.rs:28:14
|
|
|
|
|
LL | struct EthernetWorker<C>(C)
|
|
| -------------- required by a bound in this struct
|
|
LL | where
|
|
LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `EthernetWorker`
|
|
|
|
error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
|
|
--> $DIR/issue-89118.rs:22:20
|
|
|
|
|
LL | type Handler = Ctx<C::Dispatcher>;
|
|
| ^^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
|
|
|
|
help: this trait has no implementations, consider adding one
|
|
--> $DIR/issue-89118.rs:1:1
|
|
|
|
|
LL | trait BufferMut {}
|
|
| ^^^^^^^^^^^^^^^
|
|
note: required for `Ctx<()>` to implement `for<'a> BufferUdpStateContext<&'a ()>`
|
|
--> $DIR/issue-89118.rs:5:23
|
|
|
|
|
LL | impl<B: BufferMut, C> BufferUdpStateContext<B> for C {}
|
|
| --------- ^^^^^^^^^^^^^^^^^^^^^^^^ ^
|
|
| |
|
|
| unsatisfied trait bound introduced here
|
|
note: required by a bound in `StackContext`
|
|
--> $DIR/issue-89118.rs:9:14
|
|
|
|
|
LL | trait StackContext
|
|
| ------------ required by a bound in this trait
|
|
LL | where
|
|
LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>,
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StackContext`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|