mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
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.
28 lines
926 B
Plaintext
28 lines
926 B
Plaintext
error[E0277]: the trait bound `f64: Eq` is not satisfied
|
|
--> $DIR/issue-103157.rs:6:11
|
|
|
|
|
LL | #[derive(PartialEq, Eq)]
|
|
| -- in this derive macro expansion
|
|
...
|
|
LL | Float(Option<f64>),
|
|
| ^^^^^^^^^^^ the trait `Eq` is not implemented for `f64`, which is required by `Option<f64>: Eq`
|
|
|
|
|
= help: the following other types implement trait `Eq`:
|
|
isize
|
|
i8
|
|
i16
|
|
i32
|
|
i64
|
|
i128
|
|
usize
|
|
u8
|
|
and 4 others
|
|
= note: required for `Option<f64>` to implement `Eq`
|
|
note: required by a bound in `AssertParamIsEq`
|
|
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
|
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|