File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1597,6 +1597,16 @@ impl Config {
15971597 term_search_borrowck : self . assist_termSearch_borrowcheck ( source_root) . to_owned ( ) ,
15981598 }
15991599 }
1600+
1601+ pub fn diagnostic_fixes ( & self , source_root : Option < SourceRootId > ) -> DiagnosticsConfig {
1602+ // We always want to show quickfixes for diagnostics, even when diagnostics/experimental diagnostics are disabled.
1603+ DiagnosticsConfig {
1604+ enabled : true ,
1605+ disable_experimental : false ,
1606+ ..self . diagnostics ( source_root)
1607+ }
1608+ }
1609+
16001610 pub fn expand_proc_attr_macros ( & self ) -> bool {
16011611 self . procMacro_enable ( ) . to_owned ( ) && self . procMacro_attributes_enable ( ) . to_owned ( )
16021612 }
Original file line number Diff line number Diff line change @@ -1439,7 +1439,7 @@ pub(crate) fn handle_code_action(
14391439 } ;
14401440 let assists = snap. analysis . assists_with_fixes (
14411441 & assists_config,
1442- & snap. config . diagnostics ( Some ( source_root) ) ,
1442+ & snap. config . diagnostic_fixes ( Some ( source_root) ) ,
14431443 resolve,
14441444 frange,
14451445 ) ?;
@@ -1530,7 +1530,7 @@ pub(crate) fn handle_code_action_resolve(
15301530
15311531 let assists = snap. analysis . assists_with_fixes (
15321532 & assists_config,
1533- & snap. config . diagnostics ( Some ( source_root) ) ,
1533+ & snap. config . diagnostic_fixes ( Some ( source_root) ) ,
15341534 AssistResolveStrategy :: Single ( assist_resolve) ,
15351535 frange,
15361536 ) ?;
You can’t perform that action at this time.
0 commit comments