Skip to content

Commit b93994b

Browse files
Generic fn ptr hover panic reproducer
Just run ``` cargo test -p ide hover_fn_ptr_from_generic_with_impl ```
1 parent b231422 commit b93994b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

crates/ide/src/hover/tests.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8579,3 +8579,24 @@ fn main(a$0: T) {}
85798579
"#]],
85808580
);
85818581
}
8582+
8583+
#[test]
8584+
fn hover_fn_ptr_from_generic_with_impl() {
8585+
check(
8586+
r#"
8587+
fn bar<const WIDTH: u8>(_: impl Copy) {}
8588+
fn test() {
8589+
let f$0 = bar::<3>;
8590+
f(4);
8591+
}
8592+
"#,
8593+
expect![[r#"
8594+
*f*
8595+
8596+
```rust
8597+
// size = 0, align = 1
8598+
let f: fn bar<3>(i32)
8599+
```
8600+
"#]],
8601+
);
8602+
}

0 commit comments

Comments
 (0)