File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
crates/ide/src/syntax_highlighting Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ fn highlight_def(
515
515
} ) ;
516
516
let is_from_other_crate = def_crate != krate;
517
517
let is_from_builtin_crate =
518
- def_crate. map_or ( false , |it | famous_defs. builtin_crates ( ) . contains ( & it) ) ;
518
+ def_crate. map_or ( false , |def_crate | famous_defs. builtin_crates ( ) . any ( |it| def_crate == it) ) ;
519
519
let is_builtin_type = matches ! ( def, Definition :: ModuleDef ( hir:: ModuleDef :: BuiltinType ( _) ) ) ;
520
520
let is_public = def. visibility ( db) == Some ( hir:: Visibility :: Public ) ;
521
521
@@ -564,7 +564,7 @@ fn highlight_method_call(
564
564
let famous_defs = FamousDefs ( & sema, krate) ;
565
565
let def_crate = func. module ( sema. db ) . krate ( ) ;
566
566
let is_from_other_crate = Some ( def_crate) != krate;
567
- let is_from_builtin_crate = famous_defs. builtin_crates ( ) . contains ( & def_crate) ;
567
+ let is_from_builtin_crate = famous_defs. builtin_crates ( ) . any ( |it| def_crate == it ) ;
568
568
let is_public = func. visibility ( sema. db ) == hir:: Visibility :: Public ;
569
569
570
570
if is_from_other_crate {
You can’t perform that action at this time.
0 commit comments