diff options
| author | 1hakusai1 <1hakusai1@gmail.com> | 2025-01-20 21:22:58 +0900 |
|---|---|---|
| committer | 1hakusai1 <1hakusai1@gmail.com> | 2025-01-20 21:22:58 +0900 |
| commit | f7096db910620d33bb70dc31ddab69d12c0ce96e (patch) | |
| tree | cef5ace5674a8b79f47731679f92aa4eaba5f348 | |
| parent | 55aee5470b8129887fb358edcb2231fb66504ed0 (diff) | |
| download | rust-f7096db910620d33bb70dc31ddab69d12c0ce96e.tar.gz rust-f7096db910620d33bb70dc31ddab69d12c0ce96e.zip | |
Add a test case
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide/src/goto_definition.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs b/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs index 905376e7557..f804cc36772 100644 --- a/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs +++ b/src/tools/rust-analyzer/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#" |
