introduce new lint infra
lint on duplicates during attribute parsing To do this we stuff them in the diagnostic context to be emitted after hir is constructed
This commit is contained in:
14
compiler/rustc_attr_data_structures/src/lints.rs
Normal file
14
compiler/rustc_attr_data_structures/src/lints.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use rustc_macros::HashStable_Generic;
|
||||
use rustc_span::Span;
|
||||
|
||||
#[derive(Clone, Debug, HashStable_Generic)]
|
||||
pub struct AttributeLint<Id> {
|
||||
pub id: Id,
|
||||
pub span: Span,
|
||||
pub kind: AttributeLintKind,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, HashStable_Generic)]
|
||||
pub enum AttributeLintKind {
|
||||
UnusedDuplicate { this: Span, other: Span, warning: bool },
|
||||
}
|
||||
Reference in New Issue
Block a user