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/ide/src/syntax_highlighting | |
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/ide/src/syntax_highlighting')
-rw-r--r-- | crates/ide/src/syntax_highlighting/format.rs | 4 | ||||
-rw-r--r-- | crates/ide/src/syntax_highlighting/injection.rs | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/crates/ide/src/syntax_highlighting/format.rs b/crates/ide/src/syntax_highlighting/format.rs index 71bde24f0..42f27df5d 100644 --- a/crates/ide/src/syntax_highlighting/format.rs +++ b/crates/ide/src/syntax_highlighting/format.rs | |||
@@ -29,9 +29,7 @@ impl FormatStringHighlighter { | |||
29 | .children_with_tokens() | 29 | .children_with_tokens() |
30 | .filter(|t| t.kind() != SyntaxKind::WHITESPACE) | 30 | .filter(|t| t.kind() != SyntaxKind::WHITESPACE) |
31 | .nth(1) | 31 | .nth(1) |
32 | .filter(|e| { | 32 | .filter(|e| ast::String::can_cast(e.kind())) |
33 | ast::String::can_cast(e.kind()) || ast::RawString::can_cast(e.kind()) | ||
34 | }) | ||
35 | } | 33 | } |
36 | _ => {} | 34 | _ => {} |
37 | } | 35 | } |
diff --git a/crates/ide/src/syntax_highlighting/injection.rs b/crates/ide/src/syntax_highlighting/injection.rs index 59a74bc02..e97d1be1a 100644 --- a/crates/ide/src/syntax_highlighting/injection.rs +++ b/crates/ide/src/syntax_highlighting/injection.rs | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | use std::{collections::BTreeMap, convert::TryFrom}; | 3 | use std::{collections::BTreeMap, convert::TryFrom}; |
4 | 4 | ||
5 | use ast::{HasQuotes, HasStringValue}; | ||
6 | use hir::Semantics; | 5 | use hir::Semantics; |
7 | use ide_db::call_info::ActiveParameter; | 6 | use ide_db::call_info::ActiveParameter; |
8 | use itertools::Itertools; | 7 | use itertools::Itertools; |
@@ -15,7 +14,7 @@ use super::HighlightedRangeStack; | |||
15 | pub(super) fn highlight_injection( | 14 | pub(super) fn highlight_injection( |
16 | acc: &mut HighlightedRangeStack, | 15 | acc: &mut HighlightedRangeStack, |
17 | sema: &Semantics<RootDatabase>, | 16 | sema: &Semantics<RootDatabase>, |
18 | literal: ast::RawString, | 17 | literal: ast::String, |
19 | expanded: SyntaxToken, | 18 | expanded: SyntaxToken, |
20 | ) -> Option<()> { | 19 | ) -> Option<()> { |
21 | let active_parameter = ActiveParameter::at_token(&sema, expanded)?; | 20 | let active_parameter = ActiveParameter::at_token(&sema, expanded)?; |