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 03:49:36 +00:00
|
|
|
// tidy-alphabetical-start
|
2022-11-09 08:52:59 +00:00
|
|
|
#![feature(decl_macro)]
|
2024-09-24 21:25:16 +00:00
|
|
|
#![feature(file_buffered)]
|
2024-06-22 07:27:59 +00:00
|
|
|
#![feature(iter_intersperse)]
|
MCP636: Add simpler and more explicit syntax to check-cfg
This add a new form and deprecated the other ones:
- cfg(name1, ..., nameN, values("value1", "value2", ... "valueN"))
- cfg(name1, ..., nameN) or cfg(name1, ..., nameN, values())
- cfg(any())
It also changes the default exhaustiveness to be enable-by-default in
the presence of any --check-cfg arguments.
2023-05-01 12:17:56 +00:00
|
|
|
#![feature(let_chains)]
|
2023-01-09 15:15:26 +00:00
|
|
|
#![feature(try_blocks)]
|
2024-08-27 05:11:54 +00:00
|
|
|
#![warn(unreachable_pub)]
|
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 03:49:36 +00:00
|
|
|
// tidy-alphabetical-end
|
2018-12-08 19:30:23 +00:00
|
|
|
|
2019-12-25 18:38:57 +00:00
|
|
|
mod callbacks;
|
2022-08-20 16:30:49 +00:00
|
|
|
mod errors;
|
2018-12-08 19:30:23 +00:00
|
|
|
pub mod interface;
|
2024-06-22 09:14:26 +00:00
|
|
|
pub mod passes;
|
2018-12-08 19:30:23 +00:00
|
|
|
mod proc_macro_decls;
|
|
|
|
mod queries;
|
2018-12-08 19:30:23 +00:00
|
|
|
pub mod util;
|
2018-12-08 19:30:23 +00:00
|
|
|
|
2021-06-25 11:03:39 +00:00
|
|
|
pub use callbacks::setup_callbacks;
|
2018-12-08 19:30:23 +00:00
|
|
|
pub use interface::{Config, run_compiler};
|
2023-09-22 16:38:31 +00:00
|
|
|
pub use passes::DEFAULT_QUERY_PROVIDERS;
|
2024-06-30 18:44:11 +00:00
|
|
|
pub use queries::{Linker, Queries};
|
2019-10-11 21:48:16 +00:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests;
|
2022-10-13 09:13:02 +00:00
|
|
|
|
2023-11-21 22:53:07 +00:00
|
|
|
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|