Add a test case

This commit is contained in:
1hakusai1 2025-01-20 21:22:58 +09:00
parent 5384dd8947
commit 913ec54f84

View File

@ -3062,6 +3062,30 @@ fn f() {
);
}
#[test]
fn into_call_to_from_definition_with_trait_bounds() {
check(
r#"
//- minicore: from, iterator
struct A;
impl<T> From<T> for A
where
T: IntoIterator<Item = i64>,
{
fn from(value: T) -> Self {
//^^^^
A
}
}
fn f() {
let a: A = [1, 2, 3].into$0();
}
"#,
);
}
#[test]
fn goto_into_definition_if_exists() {
check(