aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/introduce_named_lifetime.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-06 21:21:56 +0000
committerAleksey Kladov <[email protected]>2020-11-06 21:23:14 +0000
commit5ba4f949c23dcf53f34995c90b7c01e6c641b1f0 (patch)
treefe5064dde4e948a776c87d38fba972903acad3ec /crates/assists/src/handlers/introduce_named_lifetime.rs
parent6725dcf847300b9cddcbb061b159317113860f31 (diff)
Kill RAW_ literals
Syntactically, they are indistinguishable from non-raw versions, so it doesn't make sense to separate then *at the syntax* level.
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 5f623e5f7..4cc8dae65 100644
--- a/crates/assists/src/handlers/introduce_named_lifetime.rs
+++ b/crates/assists/src/handlers/introduce_named_lifetime.rs
@@ -36,7 +36,7 @@ static ASSIST_LABEL: &str = "Introduce named lifetime";
36// FIXME: should also add support for the case fun(f: &Foo) -> &<|>Foo 36// FIXME: should also add support for the case fun(f: &Foo) -> &<|>Foo
37pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { 37pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
38 let lifetime_token = ctx 38 let lifetime_token = ctx
39 .find_token_at_offset(SyntaxKind::LIFETIME) 39 .find_token_syntax_at_offset(SyntaxKind::LIFETIME)
40 .filter(|lifetime| lifetime.text() == "'_")?; 40 .filter(|lifetime| lifetime.text() == "'_")?;
41 if let Some(fn_def) = lifetime_token.ancestors().find_map(ast::Fn::cast) { 41 if let Some(fn_def) = lifetime_token.ancestors().find_map(ast::Fn::cast) {
42 generate_fn_def_assist(acc, &fn_def, lifetime_token.text_range()) 42 generate_fn_def_assist(acc, &fn_def, lifetime_token.text_range())