Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
-rw-r--r--crates/ide/src/hover/tests.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index ecfcf82e00..516e32ef91 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -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)
+ ```
+ "#]],
+ );
+}