[Refactor] Rename Lint and LintGroup\'s is_loaded to is_externally_loaded
This commit is contained in:
parent
90846015cc
commit
d31b7db8e4
4 changed files with 18 additions and 15 deletions
|
@ -323,7 +323,8 @@ pub struct Lint {
|
|||
|
||||
pub future_incompatible: Option<FutureIncompatibleInfo>,
|
||||
|
||||
pub is_loaded: bool,
|
||||
/// `true` if this lint is being loaded by another tool (e.g. Clippy).
|
||||
pub is_externally_loaded: bool,
|
||||
|
||||
/// `Some` if this lint is feature gated, otherwise `None`.
|
||||
pub feature_gate: Option<Symbol>,
|
||||
|
@ -468,7 +469,7 @@ impl Lint {
|
|||
default_level: Level::Forbid,
|
||||
desc: "",
|
||||
edition_lint_opts: None,
|
||||
is_loaded: false,
|
||||
is_externally_loaded: false,
|
||||
report_in_external_macro: false,
|
||||
future_incompatible: None,
|
||||
feature_gate: None,
|
||||
|
@ -817,7 +818,7 @@ macro_rules! declare_lint {
|
|||
name: stringify!($NAME),
|
||||
default_level: $crate::$Level,
|
||||
desc: $desc,
|
||||
is_loaded: false,
|
||||
is_externally_loaded: false,
|
||||
$($v: true,)*
|
||||
$(feature_gate: Some($gate),)?
|
||||
$(future_incompatible: Some($crate::FutureIncompatibleInfo {
|
||||
|
@ -859,7 +860,7 @@ macro_rules! declare_tool_lint {
|
|||
edition_lint_opts: None,
|
||||
report_in_external_macro: $external,
|
||||
future_incompatible: None,
|
||||
is_loaded: true,
|
||||
is_externally_loaded: true,
|
||||
$(feature_gate: Some($gate),)?
|
||||
crate_level_only: false,
|
||||
..$crate::Lint::default_fields_for_macro()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue