Disallow setting built-in cfgs via set the command-line
This commit is contained in:
parent
eedb32dd12
commit
c0c57b3e29
41 changed files with 436 additions and 73 deletions
|
@ -438,5 +438,8 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: &
|
|||
BuiltinLintDiag::OutOfScopeMacroCalls { path } => {
|
||||
lints::OutOfScopeMacroCalls { path }.decorate_lint(diag)
|
||||
}
|
||||
BuiltinLintDiag::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by } => {
|
||||
lints::UnexpectedBuiltinCfg { cfg, cfg_name, controlled_by }.decorate_lint(diag)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2379,6 +2379,16 @@ pub mod unexpected_cfg_value {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_unexpected_builtin_cfg)]
|
||||
#[note(lint_controlled_by)]
|
||||
#[note(lint_incoherent)]
|
||||
pub struct UnexpectedBuiltinCfg {
|
||||
pub(crate) cfg: String,
|
||||
pub(crate) cfg_name: Symbol,
|
||||
pub(crate) controlled_by: &'static str,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_macro_use_deprecated)]
|
||||
#[help]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue