diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 9df8d21af..cf1a8bad7 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -80,6 +80,7 @@ pub(crate) fn highlight( | |||
80 | &mut hl, | 80 | &mut hl, |
81 | &sema, | 81 | &sema, |
82 | InFile::new(file_id.into(), &root), | 82 | InFile::new(file_id.into(), &root), |
83 | sema.scope(&root).krate(), | ||
83 | range_to_highlight, | 84 | range_to_highlight, |
84 | syntactic_name_ref_highlighting, | 85 | syntactic_name_ref_highlighting, |
85 | ); | 86 | ); |
@@ -90,6 +91,7 @@ fn traverse( | |||
90 | hl: &mut Highlights, | 91 | hl: &mut Highlights, |
91 | sema: &Semantics<RootDatabase>, | 92 | sema: &Semantics<RootDatabase>, |
92 | root: InFile<&SyntaxNode>, | 93 | root: InFile<&SyntaxNode>, |
94 | krate: Option<hir::Crate>, | ||
93 | range_to_highlight: TextRange, | 95 | range_to_highlight: TextRange, |
94 | syntactic_name_ref_highlighting: bool, | 96 | syntactic_name_ref_highlighting: bool, |
95 | ) { | 97 | ) { |
@@ -209,6 +211,7 @@ fn traverse( | |||
209 | 211 | ||
210 | if let Some((mut highlight, binding_hash)) = highlight::element( | 212 | if let Some((mut highlight, binding_hash)) = highlight::element( |
211 | &sema, | 213 | &sema, |
214 | krate, | ||
212 | &mut bindings_shadow_count, | 215 | &mut bindings_shadow_count, |
213 | syntactic_name_ref_highlighting, | 216 | syntactic_name_ref_highlighting, |
214 | element_to_highlight.clone(), | 217 | element_to_highlight.clone(), |