mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00

When a trait bound fails due to the Self type parameter, adjust_fulfillment_errors now correctly points to the corresponding function argument instead of incorrectly pointing to other arguments. Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
18 lines
540 B
Plaintext
18 lines
540 B
Plaintext
error[E0277]: the trait bound `{integer}: A<_>` is not satisfied
|
|
--> $DIR/false-span-in-trait-bound-label.rs:9:10
|
|
|
|
|
LL | A::f(1, "");
|
|
| ---- ^ the trait `A<_>` is not implemented for `{integer}`
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
help: this trait has no implementations, consider adding one
|
|
--> $DIR/false-span-in-trait-bound-label.rs:4:1
|
|
|
|
|
LL | trait A<T> {
|
|
| ^^^^^^^^^^
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|