diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-02-12 13:59:08 +0100 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-06-12 09:56:47 +0200 |
| commit | 6072207a1151f212163e3c19d92ff4ea22f291b2 (patch) | |
| tree | 53855f9f1b959d32f14f0ae33f4cdd8c17f9ea88 /compiler/rustc_attr_parsing/src/lib.rs | |
| parent | 4e1b6d13a20e5b72922f085fb4b248848ca02910 (diff) | |
| download | rust-6072207a1151f212163e3c19d92ff4ea22f291b2.tar.gz rust-6072207a1151f212163e3c19d92ff4ea22f291b2.zip | |
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
Diffstat (limited to 'compiler/rustc_attr_parsing/src/lib.rs')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_attr_parsing/src/lib.rs b/compiler/rustc_attr_parsing/src/lib.rs index 15037e802ff..5c458575c76 100644 --- a/compiler/rustc_attr_parsing/src/lib.rs +++ b/compiler/rustc_attr_parsing/src/lib.rs @@ -62,7 +62,7 @@ //! a "stability" of an item. So, the stability attribute has an //! [`AttributeParser`](attributes::AttributeParser) that recognizes both the `#[stable()]` //! and `#[unstable()]` syntactic attributes, and at the end produce a single -//! [`AttributeKind::Stability`](rustc_attr_data_structures::AttributeKind::Stability). +//! [`AttributeKind::Stability`]. //! //! When multiple instances of the same attribute are allowed, they're combined into a single //! semantic attribute. For example: @@ -86,6 +86,7 @@ #[macro_use] mod attributes; mod context; +mod lints; pub mod parser; mod session_diagnostics; @@ -93,6 +94,7 @@ pub use attributes::cfg::*; pub use attributes::util::{ find_crate_name, is_builtin_attr, is_doc_alias_attrs_contain_symbol, parse_version, }; -pub use context::{AttributeParser, OmitDoc}; +pub use context::{AttributeParser, Early, Late, OmitDoc}; +pub use lints::emit_attribute_lint; rustc_fluent_macro::fluent_messages! { "../messages.ftl" } |
