Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/goto_definition.rs')
-rw-r--r--crates/ide/src/goto_definition.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs
index 905376e755..f804cc3677 100644
--- a/crates/ide/src/goto_definition.rs
+++ b/crates/ide/src/goto_definition.rs
@@ -3063,6 +3063,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(
r#"