diff options
| author | Jonathan Dönszelmann <jonathan@donsz.nl> | 2024-12-13 14:47:11 +0100 |
|---|---|---|
| committer | Jonathan Dönszelmann <jonathan@donsz.nl> | 2024-12-16 19:08:19 +0100 |
| commit | efb98b6552abd00c58a2c1dd171b9086edf28214 (patch) | |
| tree | 1a8ad8d3257b94c8a0c4bf75629851a1ae94289c /compiler/rustc_attr/src/lib.rs | |
| parent | 1341366af911a16c53513d5eda2cc8cf31c8c027 (diff) | |
| download | rust-efb98b6552abd00c58a2c1dd171b9086edf28214.tar.gz rust-efb98b6552abd00c58a2c1dd171b9086edf28214.zip | |
rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structures
Diffstat (limited to 'compiler/rustc_attr/src/lib.rs')
| -rw-r--r-- | compiler/rustc_attr/src/lib.rs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/compiler/rustc_attr/src/lib.rs b/compiler/rustc_attr/src/lib.rs deleted file mode 100644 index d34ff02c7ed..00000000000 --- a/compiler/rustc_attr/src/lib.rs +++ /dev/null @@ -1,40 +0,0 @@ -//! Centralized logic for parsing and validating all attributes used after HIR. -//! -//! History: Check out [#131229](https://github.com/rust-lang/rust/issues/131229). -//! There used to be only one definition of attributes in the compiler: `ast::Attribute`. -//! These were then parsed or validated or both in places distributed all over the compiler. -//! -//! Attributes are markers on items. Most are actually attribute-like proc-macros, and are expanded -//! but some remain as the built-in attributes to guide compilation. -//! -//! In this crate, syntactical attributes (sequences of tokens that look like -//! `#[something(something else)]`) are parsed into more semantic attributes, markers on items. -//! Multiple syntactic attributes might influence a single semantic attribute. For example, -//! `#[stable(...)]` and `#[unstable()]` cannot occur together, and both semantically define -//! a "stability". Stability defines an [`AttributeExtractor`](attributes::AttributeExtractor) -//! that recognizes both `#[stable()]` and `#[unstable()]` syntactic attributes, and at the end -//! produce a single [`ParsedAttributeKind::Stability`]. -//! -//! FIXME(jdonszelmann): update devguide for best practices on attributes -//! FIXME(jdonszelmann): rename to `rustc_attr` in the future, integrating it into this crate. -//! -//! To define a new builtin, first add it - -// tidy-alphabetical-start -#![allow(internal_features)] -#![doc(rust_logo)] -#![feature(let_chains)] -#![feature(rustdoc_internals)] -#![warn(unreachable_pub)] -// tidy-alphabetical-end - -mod attributes; -mod session_diagnostics; -mod types; - -pub use attributes::*; -pub(crate) use rustc_session::HashStableContext; -pub use types::*; -pub use util::{find_crate_name, is_builtin_attr, parse_version}; - -rustc_fluent_macro::fluent_messages! { "../messages.ftl" } |
