mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
Always include quickfixes for diagnostics, even when diagnostics are disabled
This commit is contained in:
parent
d5665e5ca7
commit
869714aae0
2 changed files with 12 additions and 2 deletions
|
|
@ -1597,6 +1597,16 @@ impl Config {
|
|||
term_search_borrowck: self.assist_termSearch_borrowcheck(source_root).to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn diagnostic_fixes(&self, source_root: Option<SourceRootId>) -> DiagnosticsConfig {
|
||||
// We always want to show quickfixes for diagnostics, even when diagnostics/experimental diagnostics are disabled.
|
||||
DiagnosticsConfig {
|
||||
enabled: true,
|
||||
disable_experimental: false,
|
||||
..self.diagnostics(source_root)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn expand_proc_attr_macros(&self) -> bool {
|
||||
self.procMacro_enable().to_owned() && self.procMacro_attributes_enable().to_owned()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1439,7 +1439,7 @@ pub(crate) fn handle_code_action(
|
|||
};
|
||||
let assists = snap.analysis.assists_with_fixes(
|
||||
&assists_config,
|
||||
&snap.config.diagnostics(Some(source_root)),
|
||||
&snap.config.diagnostic_fixes(Some(source_root)),
|
||||
resolve,
|
||||
frange,
|
||||
)?;
|
||||
|
|
@ -1530,7 +1530,7 @@ pub(crate) fn handle_code_action_resolve(
|
|||
|
||||
let assists = snap.analysis.assists_with_fixes(
|
||||
&assists_config,
|
||||
&snap.config.diagnostics(Some(source_root)),
|
||||
&snap.config.diagnostic_fixes(Some(source_root)),
|
||||
AssistResolveStrategy::Single(assist_resolve),
|
||||
frange,
|
||||
)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue