Add FCW for derive helper attributes that will conflict with built-in attributes
This commit is contained in:
parent
d00ba92259
commit
846e4ee5dc
7 changed files with 120 additions and 0 deletions
|
|
@ -383,6 +383,10 @@ pub fn decorate_attribute_lint(
|
|||
lints::DocAutoCfgExpectsHideOrShow.decorate_lint(diag)
|
||||
}
|
||||
|
||||
&AttributeLintKind::AmbiguousDeriveHelpers => {
|
||||
lints::AmbiguousDeriveHelpers.decorate_lint(diag)
|
||||
}
|
||||
|
||||
&AttributeLintKind::DocAutoCfgHideShowUnexpectedItem { attr_name } => {
|
||||
lints::DocAutoCfgHideShowUnexpectedItem { attr_name }.decorate_lint(diag)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3752,6 +3752,10 @@ pub(crate) struct DocAliasDuplicated {
|
|||
#[diag("only `hide` or `show` are allowed in `#[doc(auto_cfg(...))]`")]
|
||||
pub(crate) struct DocAutoCfgExpectsHideOrShow;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag("there exists a built-in attribute with the same name")]
|
||||
pub(crate) struct AmbiguousDeriveHelpers;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag("`#![doc(auto_cfg({$attr_name}(...)))]` only accepts identifiers or key/value items")]
|
||||
pub(crate) struct DocAutoCfgHideShowUnexpectedItem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue