aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 11:06:38 +0100
committerAleksey Kladov <[email protected]>2020-07-31 11:14:37 +0100
commit08ea2271e8050165d0aaf4c994ed3dd746aff3ba (patch)
tree1d5bb4ce799c6377b49ae73436d50a087db53392 /crates/ra_assists/src/handlers/introduce_named_lifetime.rs
parente0f21133cd03c6160fbc97b70bbd50ccde4fe6d9 (diff)
Rename TypeRef -> Type
The TypeRef name comes from IntelliJ days, where you often have both type *syntax* as well as *semantical* representation of types in scope. And naming both Type is confusing. In rust-analyzer however, we use ast types as `ast::Type`, and have many more semantic counterparts to ast types, so avoiding name clash here is just confusing.
Diffstat (limited to 'crates/ra_assists/src/handlers/introduce_named_lifetime.rs')
-rw-r--r--crates/ra_assists/src/handlers/introduce_named_lifetime.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
index c3134f64d..4537c73a1 100644
--- a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
+++ b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
@@ -68,7 +68,7 @@ fn generate_fn_def_assist(
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.ty() { 70 .filter_map(|param| match param.ty() {
71 Some(ast::TypeRef::ReferenceType(ascribed_type)) 71 Some(ast::Type::ReferenceType(ascribed_type))
72 if ascribed_type.lifetime_token() == None => 72 if ascribed_type.lifetime_token() == None =>
73 { 73 {
74 Some(ascribed_type.amp_token()?.text_range().end()) 74 Some(ascribed_type.amp_token()?.text_range().end())