2020-01-05 10:58:44 +01:00
|
|
|
//! The `rustc_ast_passes` crate contains passes which validate the AST in `syntax`
|
|
|
|
|
//! parsed by `rustc_parse` and then lowered, after the passes in this crate,
|
|
|
|
|
//! by `rustc_ast_lowering`.
|
2020-01-11 09:48:57 +01:00
|
|
|
//!
|
|
|
|
|
//! The crate also contains other misc AST visitors, e.g. `node_count` and `show_span`.
|
2020-01-05 10:58:44 +01:00
|
|
|
|
Use `tidy` to sort crate attributes for all compiler crates.
We already do this for a number of crates, e.g. `rustc_middle`,
`rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`.
For the ones we don't, in many cases the attributes are a mess.
- There is no consistency about order of attribute kinds (e.g.
`allow`/`deny`/`feature`).
- Within attribute kind groups (e.g. the `feature` attributes),
sometimes the order is alphabetical, and sometimes there is no
particular order.
- Sometimes the attributes of a particular kind aren't even grouped
all together, e.g. there might be a `feature`, then an `allow`, then
another `feature`.
This commit extends the existing sorting to all compiler crates,
increasing consistency. If any new attribute line is added there is now
only one place it can go -- no need for arbitrary decisions.
Exceptions:
- `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`,
because they have no crate attributes.
- `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's
ignored in `rustfmt.toml`).
2024-06-12 13:49:36 +10:00
|
|
|
// tidy-alphabetical-start
|
2023-11-13 07:39:17 -05:00
|
|
|
#![allow(internal_features)]
|
|
|
|
|
#![doc(rust_logo)]
|
2021-01-29 08:31:08 +01:00
|
|
|
#![feature(box_patterns)]
|
2022-03-09 15:04:09 -03:00
|
|
|
#![feature(if_let_guard)]
|
|
|
|
|
#![feature(iter_is_partitioned)]
|
2022-08-20 20:40:08 +02:00
|
|
|
#![feature(let_chains)]
|
Use `tidy` to sort crate attributes for all compiler crates.
We already do this for a number of crates, e.g. `rustc_middle`,
`rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`.
For the ones we don't, in many cases the attributes are a mess.
- There is no consistency about order of attribute kinds (e.g.
`allow`/`deny`/`feature`).
- Within attribute kind groups (e.g. the `feature` attributes),
sometimes the order is alphabetical, and sometimes there is no
particular order.
- Sometimes the attributes of a particular kind aren't even grouped
all together, e.g. there might be a `feature`, then an `allow`, then
another `feature`.
This commit extends the existing sorting to all compiler crates,
increasing consistency. If any new attribute line is added there is now
only one place it can go -- no need for arbitrary decisions.
Exceptions:
- `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`,
because they have no crate attributes.
- `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's
ignored in `rustfmt.toml`).
2024-06-12 13:49:36 +10:00
|
|
|
#![feature(rustdoc_internals)]
|
|
|
|
|
// tidy-alphabetical-end
|
2020-03-22 04:40:05 +01:00
|
|
|
|
2020-01-05 10:58:44 +01:00
|
|
|
pub mod ast_validation;
|
2022-08-17 23:51:01 +09:00
|
|
|
mod errors;
|
2020-01-05 11:11:39 +01:00
|
|
|
pub mod feature_gate;
|
2020-01-11 09:48:57 +01:00
|
|
|
pub mod node_count;
|
2020-01-05 11:21:26 +01:00
|
|
|
pub mod show_span;
|
2022-10-13 10:13:02 +01:00
|
|
|
|
2023-11-22 09:53:07 +11:00
|
|
|
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|