rust/tests/ui/trait-bounds/false-span-in-trait-bound-label.stderr
xizheyin 796b4d1fb4
Point to correct argument in Func Call when Self type fails trait bound
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>
2025-07-07 16:47:15 +08:00

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`.