use std::fmt::Debug;
fn run() {
let mut not_int = String::new();
Foo::write_to(123, not_int); // Error span is on the wrong argument here
}
pub trait Foo<W: Debug, Err = ()> {
fn write_to(self, not_int: W);
}
struct Test;
impl Foo<String> for Test {
fn write_to(self, not_int: String) {}
}
Playground link
Creates the following error:

rustc --version --verbose:
rustc 1.79.0-nightly (85e449a32 2024-03-22)
Playground link
Creates the following error:

rustc --version --verbose: