Open
Description
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) {}
}
rustc --version --verbose
:
rustc 1.79.0-nightly (85e449a32 2024-03-22)
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: This is a bug.Diagnostics: A diagnostic that is giving misleading or incorrect information.Status: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.