2022-06-20 02:30:21 +00:00
|
|
|
//! This crate defines the trait resolution method.
|
2020-02-22 10:44:18 +00:00
|
|
|
//!
|
|
|
|
//! - **Traits.** Trait resolution is implemented in the `traits` module.
|
|
|
|
//!
|
2020-04-11 20:02:35 +00:00
|
|
|
//! For more information about how rustc works, see the [rustc-dev-guide].
|
2020-02-22 10:44:18 +00:00
|
|
|
//!
|
2020-04-11 20:02:35 +00:00
|
|
|
//! [rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/
|
2020-02-22 10:44:18 +00:00
|
|
|
//!
|
|
|
|
//! # 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
|
2023-11-13 12:39:17 +00:00
|
|
|
#![allow(internal_features)]
|
2024-02-05 22:51:39 +00:00
|
|
|
#![allow(rustc::diagnostic_outside_of_impl)]
|
|
|
|
#![allow(rustc::untranslatable_diagnostic)]
|
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
|
|
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
|
|
|
#![doc(rust_logo)]
|
2024-03-02 18:29:53 +00:00
|
|
|
#![feature(assert_matches)]
|
2024-02-25 00:38:58 +00:00
|
|
|
#![feature(associated_type_defaults)]
|
2020-09-10 07:06:30 +00:00
|
|
|
#![feature(box_patterns)]
|
2022-03-01 21:34:35 +00:00
|
|
|
#![feature(control_flow_enum)]
|
2023-04-08 22:37:21 +00:00
|
|
|
#![feature(extract_if)]
|
2024-04-14 13:21:38 +00:00
|
|
|
#![feature(if_let_guard)]
|
2024-07-21 19:20:41 +00:00
|
|
|
#![feature(iter_intersperse)]
|
2022-08-20 18:40:08 +00:00
|
|
|
#![feature(let_chains)]
|
2020-09-19 20:17:52 +00:00
|
|
|
#![feature(never_type)]
|
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)]
|
2024-07-21 19:20:41 +00:00
|
|
|
#![feature(try_blocks)]
|
2022-08-22 19:53:34 +00:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2024-07-06 22:24:51 +00:00
|
|
|
#![feature(unwrap_infallible)]
|
2024-07-21 19:20:41 +00:00
|
|
|
#![feature(yeet_expr)]
|
2020-02-11 21:39:02 +00:00
|
|
|
#![recursion_limit = "512"] // For rustdoc
|
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
|
2020-02-22 10:44:18 +00:00
|
|
|
|
|
|
|
#[macro_use]
|
2020-08-14 06:05:01 +00:00
|
|
|
extern crate tracing;
|
2020-02-22 10:44:18 +00:00
|
|
|
|
2024-07-08 19:36:57 +00:00
|
|
|
pub mod error_reporting;
|
2022-08-26 18:08:58 +00:00
|
|
|
pub mod errors;
|
2020-02-22 10:44:18 +00:00
|
|
|
pub mod infer;
|
2023-12-18 22:45:34 +00:00
|
|
|
pub mod regions;
|
2022-12-04 03:19:10 +00:00
|
|
|
pub mod solve;
|
2020-02-22 10:44:18 +00:00
|
|
|
pub mod traits;
|
2022-10-13 09:13:02 +00:00
|
|
|
|
2023-11-21 22:53:07 +00:00
|
|
|
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|