Skip to content

Commit f7096db

Browse files
committed
Add a test case
1 parent 55aee54 commit f7096db

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/tools/rust-analyzer/crates/ide/src/goto_definition.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,6 +3062,30 @@ fn f() {
30623062
);
30633063
}
30643064

3065+
#[test]
3066+
fn into_call_to_from_definition_with_trait_bounds() {
3067+
check(
3068+
r#"
3069+
//- minicore: from, iterator
3070+
struct A;
3071+
3072+
impl<T> From<T> for A
3073+
where
3074+
T: IntoIterator<Item = i64>,
3075+
{
3076+
fn from(value: T) -> Self {
3077+
//^^^^
3078+
A
3079+
}
3080+
}
3081+
3082+
fn f() {
3083+
let a: A = [1, 2, 3].into$0();
3084+
}
3085+
"#,
3086+
);
3087+
}
3088+
30653089
#[test]
30663090
fn goto_into_definition_if_exists() {
30673091
check(

0 commit comments

Comments
 (0)