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.rs25
1 files changed, 24 insertions, 1 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index 3257305184..516e32ef91 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -1,5 +1,5 @@
use expect_test::{expect, Expect};
-use ide_db::{base_db::FileLoader, FileRange};
+use ide_db::{base_db::SourceDatabase, FileRange};
use syntax::TextRange;
use crate::{
@@ -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)
+ ```
+ "#]],
+ );
+}