2023-07-03 15:19:08 +00:00
|
|
|
//! Queries that are independent from the main solver code.
|
2018-02-25 15:58:54 +00: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 03:49:36 +00:00
|
|
|
// tidy-alphabetical-start
|
2018-03-03 05:22:19 +00:00
|
|
|
#![recursion_limit = "256"]
|
2024-08-30 05:23:49 +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-03-03 05:22:19 +00:00
|
|
|
|
2022-12-08 05:58:30 +00:00
|
|
|
mod codegen;
|
2018-02-21 15:55:16 +00:00
|
|
|
mod dropck_outlives;
|
2018-03-09 00:30:37 +00:00
|
|
|
mod evaluate_obligation;
|
2018-07-04 18:07:45 +00:00
|
|
|
mod implied_outlives_bounds;
|
2018-11-23 21:43:59 +00:00
|
|
|
mod normalize_erasing_regions;
|
|
|
|
mod normalize_projection_ty;
|
2018-06-27 10:53:23 +00:00
|
|
|
mod type_op;
|
2018-02-25 15:58:54 +00:00
|
|
|
|
2023-05-15 04:24:45 +00:00
|
|
|
use rustc_middle::query::Providers;
|
2023-05-25 18:25:44 +00:00
|
|
|
pub use rustc_trait_selection::traits::query::type_op::ascribe_user_type::type_op_ascribe_user_type_with_span;
|
|
|
|
pub use type_op::type_op_prove_predicate_with_cause;
|
2021-08-15 12:49:36 +00:00
|
|
|
|
2020-07-05 20:00:14 +00:00
|
|
|
pub fn provide(p: &mut Providers) {
|
2018-06-27 13:42:00 +00:00
|
|
|
dropck_outlives::provide(p);
|
|
|
|
evaluate_obligation::provide(p);
|
2018-07-04 18:07:45 +00:00
|
|
|
implied_outlives_bounds::provide(p);
|
2018-06-27 13:42:00 +00:00
|
|
|
normalize_projection_ty::provide(p);
|
|
|
|
normalize_erasing_regions::provide(p);
|
|
|
|
type_op::provide(p);
|
2022-12-08 05:16:39 +00:00
|
|
|
p.codegen_select_candidate = codegen::codegen_select_candidate;
|
2018-02-25 15:58:54 +00:00
|
|
|
}
|