mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
feat(diagnostics): add new config to fill default expression
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
0435463439
commit
df6fa50f92
6 changed files with 69 additions and 13 deletions
|
@ -129,10 +129,22 @@ pub enum Severity {
|
|||
WeakWarning,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum ExprFillDefaultMode {
|
||||
Todo,
|
||||
DefaultImpl,
|
||||
}
|
||||
impl Default for ExprFillDefaultMode {
|
||||
fn default() -> Self {
|
||||
Self::Todo
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct DiagnosticsConfig {
|
||||
pub disable_experimental: bool,
|
||||
pub disabled: FxHashSet<String>,
|
||||
pub expr_fill_default: ExprFillDefaultMode,
|
||||
}
|
||||
|
||||
struct DiagnosticsContext<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue