2016-01-15 12:16:54 +00:00
|
|
|
//! Various checks
|
|
|
|
//!
|
|
|
|
//! # Note
|
|
|
|
//!
|
|
|
|
//! This API is completely unstable and subject to change.
|
|
|
|
|
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
|
|
|
|
#![allow(internal_features)]
|
2020-09-23 19:51:56 +00:00
|
|
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
2023-11-13 12:39:17 +00:00
|
|
|
#![doc(rust_logo)]
|
2022-08-20 18:40:08 +00:00
|
|
|
#![feature(let_chains)]
|
2021-10-01 18:54:36 +00:00
|
|
|
#![feature(map_try_insert)]
|
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
|
|
|
#![feature(rustdoc_internals)]
|
2021-06-23 10:37:26 +00:00
|
|
|
#![feature(try_blocks)]
|
2024-08-29 05:17:14 +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-13 15:57:25 +00:00
|
|
|
|
2023-05-15 04:24:45 +00:00
|
|
|
use rustc_middle::query::Providers;
|
2017-09-11 17:09:14 +00:00
|
|
|
|
2023-08-25 21:01:06 +00:00
|
|
|
pub mod abi_test;
|
2020-01-01 16:27:30 +00:00
|
|
|
mod check_attr;
|
2019-11-06 19:44:56 +00:00
|
|
|
mod check_const;
|
2019-10-04 14:33:11 +00:00
|
|
|
pub mod dead;
|
2022-04-26 01:02:43 +00:00
|
|
|
mod debugger_visualizer;
|
2019-12-26 22:33:40 +00:00
|
|
|
mod diagnostic_items;
|
2019-10-04 14:37:40 +00:00
|
|
|
pub mod entry;
|
2022-07-11 17:59:04 +00:00
|
|
|
mod errors;
|
2024-03-06 14:54:22 +00:00
|
|
|
#[cfg(debug_assertions)]
|
2020-03-24 03:59:39 +00:00
|
|
|
pub mod hir_id_validator;
|
2019-10-04 14:31:28 +00:00
|
|
|
pub mod hir_stats;
|
2020-01-31 22:06:06 +00:00
|
|
|
mod lang_items;
|
2019-01-09 20:16:32 +00:00
|
|
|
pub mod layout_test;
|
2019-12-27 17:52:36 +00:00
|
|
|
mod lib_features;
|
2019-12-22 22:42:04 +00:00
|
|
|
mod liveness;
|
2016-01-21 09:52:37 +00:00
|
|
|
pub mod loops;
|
2020-11-25 00:00:00 +00:00
|
|
|
mod naked_functions;
|
2019-12-26 22:24:36 +00:00
|
|
|
mod reachable;
|
2019-12-29 10:20:20 +00:00
|
|
|
pub mod stability;
|
2020-01-01 16:31:03 +00:00
|
|
|
mod upvars;
|
2019-12-28 17:31:37 +00:00
|
|
|
mod weak_lang_items;
|
2017-07-31 06:22:09 +00:00
|
|
|
|
2023-11-21 22:53:07 +00:00
|
|
|
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|
2022-10-13 09:13:02 +00:00
|
|
|
|
2020-07-05 20:00:14 +00:00
|
|
|
pub fn provide(providers: &mut Providers) {
|
2020-01-01 16:27:30 +00:00
|
|
|
check_attr::provide(providers);
|
2019-11-06 19:44:56 +00:00
|
|
|
check_const::provide(providers);
|
2022-01-29 20:10:41 +00:00
|
|
|
dead::provide(providers);
|
2022-04-26 01:02:43 +00:00
|
|
|
debugger_visualizer::provide(providers);
|
2019-12-26 22:33:40 +00:00
|
|
|
diagnostic_items::provide(providers);
|
2019-10-04 14:37:40 +00:00
|
|
|
entry::provide(providers);
|
2020-01-31 22:06:06 +00:00
|
|
|
lang_items::provide(providers);
|
2019-12-27 17:52:36 +00:00
|
|
|
lib_features::provide(providers);
|
2018-06-06 20:13:52 +00:00
|
|
|
loops::provide(providers);
|
2020-11-25 00:00:00 +00:00
|
|
|
naked_functions::provide(providers);
|
2019-10-04 14:31:28 +00:00
|
|
|
liveness::provide(providers);
|
2019-12-26 22:24:36 +00:00
|
|
|
reachable::provide(providers);
|
2019-12-29 10:20:20 +00:00
|
|
|
stability::provide(providers);
|
2020-01-01 16:31:03 +00:00
|
|
|
upvars::provide(providers);
|
2017-09-11 17:09:14 +00:00
|
|
|
}
|