aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/introduce_named_lifetime.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-18 16:13:06 +0000
committerGitHub <[email protected]>2021-01-18 16:13:06 +0000
commit9daba961f236750c3a5d831c9775606271b37eff (patch)
tree6d8c037ea915434701e573bf5eb2eb1f696eef07 /crates/assists/src/handlers/introduce_named_lifetime.rs
parentcc58459ee39db804c0b4a660d1f0bb5c9c0bb648 (diff)
parent98718e0544f42e55642d2838b00d6a7bef1e2414 (diff)
Merge #7291
7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril That should be the remaining special casing for `self` 🎉 Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/introduce_named_lifetime.rs')
-rw-r--r--crates/assists/src/handlers/introduce_named_lifetime.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/introduce_named_lifetime.rs b/crates/assists/src/handlers/introduce_named_lifetime.rs
index 3f5f44d69..02782eb6d 100644
--- a/crates/assists/src/handlers/introduce_named_lifetime.rs
+++ b/crates/assists/src/handlers/introduce_named_lifetime.rs
@@ -61,7 +61,7 @@ fn generate_fn_def_assist(
61 // compute the location which implicitly has the same lifetime as the anonymous lifetime 61 // compute the location which implicitly has the same lifetime as the anonymous lifetime
62 let loc_needing_lifetime = if let Some(self_param) = self_param { 62 let loc_needing_lifetime = if let Some(self_param) = self_param {
63 // if we have a self reference, use that 63 // if we have a self reference, use that
64 Some(self_param.self_token()?.text_range().start()) 64 Some(self_param.name()?.syntax().text_range().start())
65 } else { 65 } else {
66 // otherwise, if there's a single reference parameter without a named liftime, use that 66 // otherwise, if there's a single reference parameter without a named liftime, use that
67 let fn_params_without_lifetime: Vec<_> = param_list 67 let fn_params_without_lifetime: Vec<_> = param_list