aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-24 00:54:21 +0100
committerGitHub <[email protected]>2020-04-24 00:54:21 +0100
commit601f89f2cb085ab7e638f034088f32b9428a0611 (patch)
tree2dd1fe075f1343c2a1bfaa03f800d4d3d53809ee /crates/ra_ide/src/syntax_highlighting.rs
parent5eb51c1e6049c61be60a28894b80a7753f06cfeb (diff)
parent88d243c742ecd724372c4293b6b6ea293bae2d17 (diff)
Merge #4114
4114: Refactor completion sorting r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 93d502875..d9912155b 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -19,7 +19,7 @@ use ra_syntax::{
19}; 19};
20use rustc_hash::FxHashMap; 20use rustc_hash::FxHashMap;
21 21
22use crate::{call_info::call_info_for_token, Analysis, FileId}; 22use crate::{call_info::ActiveParameter, Analysis, FileId};
23 23
24pub(crate) use html::highlight_as_html; 24pub(crate) use html::highlight_as_html;
25pub use tags::{Highlight, HighlightModifier, HighlightModifiers, HighlightTag}; 25pub use tags::{Highlight, HighlightModifier, HighlightModifiers, HighlightTag};
@@ -364,10 +364,8 @@ fn highlight_injection(
364 literal: ast::RawString, 364 literal: ast::RawString,
365 expanded: SyntaxToken, 365 expanded: SyntaxToken,
366) -> Option<()> { 366) -> Option<()> {
367 let call_info = call_info_for_token(&sema, expanded)?; 367 let active_parameter = ActiveParameter::at_token(&sema, expanded)?;
368 let idx = call_info.active_parameter?; 368 if !active_parameter.name.starts_with("ra_fixture") {
369 let name = call_info.signature.parameter_names.get(idx)?;
370 if !name.starts_with("ra_fixture") {
371 return None; 369 return None;
372 } 370 }
373 let value = literal.value()?; 371 let value = literal.value()?;