mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix: Panic while rendering function with impl trait arg
This commit is contained in:
parent
34d9409211
commit
aa62c9d664
2 changed files with 27 additions and 4 deletions
|
@ -8579,3 +8579,26 @@ fn main(a$0: T) {}
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_fn_with_impl_trait_arg() {
|
||||
check(
|
||||
r#"
|
||||
trait Foo {}
|
||||
impl Foo for bool {}
|
||||
fn bar<const WIDTH: u8>(_: impl Foo) {}
|
||||
fn test() {
|
||||
let f = bar::<3>;
|
||||
f$0(true);
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
*f*
|
||||
|
||||
```rust
|
||||
// size = 0, align = 1
|
||||
let f: fn bar<3>(bool)
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue