mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Add assist: add lifetime to type #7200
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
557cf513fa
commit
35d9944c17
1 changed files with 6 additions and 0 deletions
|
@ -158,6 +158,12 @@ mod tests {
|
||||||
"struct Foo<'a> { a: &'a i32, b: &'a usize }",
|
"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(
|
check_assist(
|
||||||
add_lifetime_to_type,
|
add_lifetime_to_type,
|
||||||
"struct Foo<T>$0 { a: &T, b: usize }",
|
"struct Foo<T>$0 { a: &T, b: usize }",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue