1
Fork 0

Add a test case

This commit is contained in:
1hakusai1 2025-01-20 21:22:58 +09:00
parent 55aee5470b
commit f7096db910

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(