diff options
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 92a1a5925..c3134f64d 100644 --- a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs +++ b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use ra_syntax::{ | 1 | use ra_syntax::{ |
2 | ast::{self, GenericParamsOwner, NameOwner, TypeAscriptionOwner}, | 2 | ast::{self, GenericParamsOwner, NameOwner}, |
3 | AstNode, SyntaxKind, TextRange, TextSize, | 3 | AstNode, SyntaxKind, TextRange, TextSize, |
4 | }; | 4 | }; |
5 | use rustc_hash::FxHashSet; | 5 | use rustc_hash::FxHashSet; |
@@ -67,7 +67,7 @@ fn generate_fn_def_assist( | |||
67 | // otherwise, if there's a single reference parameter without a named liftime, use that | 67 | // otherwise, if there's a single reference parameter without a named liftime, use that |
68 | let fn_params_without_lifetime: Vec<_> = param_list | 68 | let fn_params_without_lifetime: Vec<_> = param_list |
69 | .params() | 69 | .params() |
70 | .filter_map(|param| match param.ascribed_type() { | 70 | .filter_map(|param| match param.ty() { |
71 | Some(ast::TypeRef::ReferenceType(ascribed_type)) | 71 | Some(ast::TypeRef::ReferenceType(ascribed_type)) |
72 | if ascribed_type.lifetime_token() == None => | 72 | if ascribed_type.lifetime_token() == None => |
73 | { | 73 | { |