diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 13:51:08 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 14:16:05 +0100 |
commit | 1142112c70b705f59b7d559d9d72cdc831865158 (patch) | |
tree | 1ca467302b268c800da8b26482e90effcea08229 /crates/ra_assists/src/handlers/introduce_named_lifetime.rs | |
parent | 3e1e6227ca525f8631e0bff2215fa3de1b4f4cc1 (diff) |
Rename FnDef -> Fn
Diffstat (limited to 'crates/ra_assists/src/handlers/introduce_named_lifetime.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/introduce_named_lifetime.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs index 967593031..f3774fab1 100644 --- a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs +++ b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs | |||
@@ -38,7 +38,7 @@ pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext) - | |||
38 | let lifetime_token = ctx | 38 | let lifetime_token = ctx |
39 | .find_token_at_offset(SyntaxKind::LIFETIME) | 39 | .find_token_at_offset(SyntaxKind::LIFETIME) |
40 | .filter(|lifetime| lifetime.text() == "'_")?; | 40 | .filter(|lifetime| lifetime.text() == "'_")?; |
41 | if let Some(fn_def) = lifetime_token.ancestors().find_map(ast::FnDef::cast) { | 41 | if let Some(fn_def) = lifetime_token.ancestors().find_map(ast::Fn::cast) { |
42 | generate_fn_def_assist(acc, &fn_def, lifetime_token.text_range()) | 42 | generate_fn_def_assist(acc, &fn_def, lifetime_token.text_range()) |
43 | } else if let Some(impl_def) = lifetime_token.ancestors().find_map(ast::ImplDef::cast) { | 43 | } else if let Some(impl_def) = lifetime_token.ancestors().find_map(ast::ImplDef::cast) { |
44 | generate_impl_def_assist(acc, &impl_def, lifetime_token.text_range()) | 44 | generate_impl_def_assist(acc, &impl_def, lifetime_token.text_range()) |
@@ -50,7 +50,7 @@ pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext) - | |||
50 | /// Generate the assist for the fn def case | 50 | /// Generate the assist for the fn def case |
51 | fn generate_fn_def_assist( | 51 | fn generate_fn_def_assist( |
52 | acc: &mut Assists, | 52 | acc: &mut Assists, |
53 | fn_def: &ast::FnDef, | 53 | fn_def: &ast::Fn, |
54 | lifetime_loc: TextRange, | 54 | lifetime_loc: TextRange, |
55 | ) -> Option<()> { | 55 | ) -> Option<()> { |
56 | let param_list: ast::ParamList = fn_def.param_list()?; | 56 | let param_list: ast::ParamList = fn_def.param_list()?; |