From 98718e0544f42e55642d2838b00d6a7bef1e2414 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 15 Jan 2021 21:07:38 +0100 Subject: Wrap remaining self/super/crate in Name{Ref} --- crates/assists/src/handlers/introduce_named_lifetime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/assists/src/handlers/introduce_named_lifetime.rs') 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( // compute the location which implicitly has the same lifetime as the anonymous lifetime let loc_needing_lifetime = if let Some(self_param) = self_param { // if we have a self reference, use that - Some(self_param.self_token()?.text_range().start()) + Some(self_param.name()?.syntax().text_range().start()) } else { // otherwise, if there's a single reference parameter without a named liftime, use that let fn_params_without_lifetime: Vec<_> = param_list -- cgit v1.2.3