diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 19:53:36 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 19:53:36 +0100 |
commit | 134d3c3c5068abc5ed3e03fe5df2b524ea70753d (patch) | |
tree | de4342a453b3b504178dd17c46fab3e1d6e995d2 /crates/ra_assists/src/handlers/introduce_named_lifetime.rs | |
parent | 6f5b53013c54fa6d8429b717998cdb77a4d68b2c (diff) | |
parent | 2e2642efccd5855e4158b01a006e7884a96982bb (diff) |
Merge #5612
5612: Remove TypeAscriptionOwner r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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 | { |