diff options
author | Benjamin Coenen <[email protected]> | 2021-01-18 19:38:52 +0000 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2021-01-18 19:38:52 +0000 |
commit | 35d9944c17d1477fa78cb0683fe60a8445458586 (patch) | |
tree | b3098373128ef5e5a998fc5a0ab6ea57feca168f /crates/assists/src/handlers | |
parent | 557cf513fa8126a71775cc559d5242cf4feac625 (diff) |
Add assist: add lifetime to type #7200
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers')
-rw-r--r-- | crates/assists/src/handlers/add_lifetime_to_type.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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 | |||
@@ -160,6 +160,12 @@ mod tests { | |||
160 | 160 | ||
161 | check_assist( | 161 | check_assist( |
162 | add_lifetime_to_type, | 162 | add_lifetime_to_type, |
163 | "struct Foo { a: &$0i32, b: usize }", | ||
164 | "struct Foo<'a> { a: &'a i32, b: usize }", | ||
165 | ); | ||
166 | |||
167 | check_assist( | ||
168 | add_lifetime_to_type, | ||
163 | "struct Foo<T>$0 { a: &T, b: usize }", | 169 | "struct Foo<T>$0 { a: &T, b: usize }", |
164 | "struct Foo<'a, T> { a: &'a T, b: usize }", | 170 | "struct Foo<'a, T> { a: &'a T, b: usize }", |
165 | ); | 171 | ); |