@@ -37,7 +37,7 @@ pub struct HighlightRelatedConfig {
3737 pub break_points : bool ,
3838 pub closure_captures : bool ,
3939 pub yield_points : bool ,
40- pub branches : bool ,
40+ pub branch_exit_points : bool ,
4141}
4242
4343type HighlightMap = FxHashMap < EditionedFileId , FxHashSet < HighlightedRange > > ;
@@ -81,8 +81,8 @@ pub(crate) fn highlight_related(
8181 T ! [ fn ] | T ! [ return ] | T ! [ ->] if config. exit_points => {
8282 highlight_exit_points ( sema, token) . remove ( & file_id)
8383 }
84- T ! [ match ] | T ! [ =>] | T ! [ if ] if config. branches => {
85- highlight_branches ( sema, token) . remove ( & file_id)
84+ T ! [ match ] | T ! [ =>] | T ! [ if ] if config. branch_exit_points => {
85+ highlight_branch_exit_points ( sema, token) . remove ( & file_id)
8686 }
8787 T ! [ await ] | T ! [ async ] if config. yield_points => {
8888 highlight_yield_points ( sema, token) . remove ( & file_id)
@@ -306,7 +306,7 @@ fn highlight_references(
306306 if res. is_empty ( ) { None } else { Some ( res. into_iter ( ) . collect ( ) ) }
307307}
308308
309- pub ( crate ) fn highlight_branches (
309+ pub ( crate ) fn highlight_branch_exit_points (
310310 sema : & Semantics < ' _ , RootDatabase > ,
311311 token : SyntaxToken ,
312312) -> FxHashMap < EditionedFileId , Vec < HighlightedRange > > {
@@ -871,7 +871,7 @@ mod tests {
871871 references : true ,
872872 closure_captures : true ,
873873 yield_points : true ,
874- branches : true ,
874+ branch_exit_points : true ,
875875 } ;
876876
877877 #[ track_caller]
@@ -2298,7 +2298,7 @@ fn main() {
22982298
22992299 #[ test]
23002300 fn no_branches_when_disabled ( ) {
2301- let config = HighlightRelatedConfig { branches : false , ..ENABLED_CONFIG } ;
2301+ let config = HighlightRelatedConfig { branch_exit_points : false , ..ENABLED_CONFIG } ;
23022302 check_with_config (
23032303 r#"
23042304fn main() {
0 commit comments