Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints/bind_pat.rs')
-rw-r--r--crates/ide/src/inlay_hints/bind_pat.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/crates/ide/src/inlay_hints/bind_pat.rs b/crates/ide/src/inlay_hints/bind_pat.rs
index 07b9f9cc1f..0cb8c485b2 100644
--- a/crates/ide/src/inlay_hints/bind_pat.rs
+++ b/crates/ide/src/inlay_hints/bind_pat.rs
@@ -332,6 +332,25 @@ fn main(a: SliceIter<'_, Container>) {
}
#[test]
+ fn lt_hints() {
+ check_types(
+ r#"
+struct S<'lt>;
+
+fn f<'a>() {
+ let x = S::<'static>;
+ //^ S<'static>
+ let y = S::<'_>;
+ //^ S
+ let z = S::<'a>;
+ //^ S<'a>
+
+}
+"#,
+ );
+ }
+
+ #[test]
fn fn_hints() {
check_types(
r#"
@@ -341,7 +360,7 @@ fn foo1() -> impl Fn(f64) { loop {} }
fn foo2() -> impl Fn(f64, f64) { loop {} }
fn foo3() -> impl Fn(f64, f64) -> u32 { loop {} }
fn foo4() -> &'static dyn Fn(f64, f64) -> u32 { loop {} }
-fn foo5() -> &'static dyn Fn(&'static dyn Fn(f64, f64) -> u32, f64) -> u32 { loop {} }
+fn foo5() -> &'static for<'a> dyn Fn(&'a dyn Fn(f64, f64) -> u32, f64) -> u32 { loop {} }
fn foo6() -> impl Fn(f64, f64) -> u32 + Sized { loop {} }
fn foo7() -> *const (impl Fn(f64, f64) -> u32 + Sized) { loop {} }