diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-06 21:39:02 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-06 21:39:02 +0000 |
commit | 7f12a1f225c7d3397f27964ce039b55d680772d3 (patch) | |
tree | 26043b20588eae4510e28249f11a094aacaf190d /crates/assists/src/handlers/introduce_named_lifetime.rs | |
parent | cdddcaee851be1cff1eeb23599f5a58f1b30a927 (diff) | |
parent | 6158304f8b64ef7cdf58b14bc675baf33a27a853 (diff) |
Merge #6485
6485: Remove RAW literals r=matklad a=matklad
bors r+
🤖
closes https://github.com/rust-analyzer/rust-analyzer/issues/6308
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/introduce_named_lifetime.rs')
-rw-r--r-- | crates/assists/src/handlers/introduce_named_lifetime.rs | 2 |
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 |
37 | pub(crate) fn introduce_named_lifetime(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | 37 | pub(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()) |