From 35d9944c17d1477fa78cb0683fe60a8445458586 Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Mon, 18 Jan 2021 20:38:52 +0100 Subject: Add assist: add lifetime to type #7200 Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- crates/assists/src/handlers/add_lifetime_to_type.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/assists/src/handlers') diff --git a/crates/assists/src/handlers/add_lifetime_to_type.rs b/crates/assists/src/handlers/add_lifetime_to_type.rs index c7af84704..3743858a8 100644 --- a/crates/assists/src/handlers/add_lifetime_to_type.rs +++ b/crates/assists/src/handlers/add_lifetime_to_type.rs @@ -158,6 +158,12 @@ mod tests { "struct Foo<'a> { a: &'a i32, b: &'a usize }", ); + check_assist( + add_lifetime_to_type, + "struct Foo { a: &$0i32, b: usize }", + "struct Foo<'a> { a: &'a i32, b: usize }", + ); + check_assist( add_lifetime_to_type, "struct Foo$0 { a: &T, b: usize }", -- cgit v1.2.3