Add assist: add lifetime to type #7200

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
Benjamin Coenen 2021-01-18 20:38:52 +01:00
parent 557cf513fa
commit 35d9944c17

View file

@ -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<T>$0 { a: &T, b: usize }",