mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 20:47:36 +00:00

Make InferCtxtExt use a FxIndexMap This should be faster, because the map is only being used to iterate, which is supposed to be faster with the IndexMap Make the user_computed_preds use an IndexMap It is being used mostly for iteration, so the change shouldn't result in a perf hit Make the RegionDeps fields use an IndexMap This change could be a perf hit. Both `larger` and `smaller` are used for iteration, but they are also used for insertions. Make types_without_default_bounds use an IndexMap It uses extend, but it also iterates and removes items. Not sure if this will be a perf hit. Make InferTtxt.reported_trait_errors use an IndexMap This change brought a lot of other changes. The map seems to have been mostly used for iteration, so the performance shouldn't suffer. Add FIXME to change ProvisionalEvaluationCache.map to use an IndexMap Right now this results in a perf hit. IndexMap doesn't have the `drain_filter` API, so in `on_completion` we now need to iterate two times over the map.
40 lines
1.0 KiB
Rust
40 lines
1.0 KiB
Rust
//! This crate defines the trait resolution method.
|
|
//!
|
|
//! - **Traits.** Trait resolution is implemented in the `traits` module.
|
|
//!
|
|
//! For more information about how rustc works, see the [rustc-dev-guide].
|
|
//!
|
|
//! [rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/
|
|
//!
|
|
//! # Note
|
|
//!
|
|
//! This API is completely unstable and subject to change.
|
|
|
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
|
#![feature(box_patterns)]
|
|
#![feature(control_flow_enum)]
|
|
#![feature(drain_filter)]
|
|
#![feature(hash_drain_filter)]
|
|
#![feature(let_chains)]
|
|
#![feature(if_let_guard)]
|
|
#![feature(never_type)]
|
|
#![feature(type_alias_impl_trait)]
|
|
#![recursion_limit = "512"] // For rustdoc
|
|
|
|
#[macro_use]
|
|
extern crate rustc_macros;
|
|
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
|
|
#[macro_use]
|
|
extern crate rustc_data_structures;
|
|
#[macro_use]
|
|
extern crate tracing;
|
|
#[macro_use]
|
|
extern crate rustc_middle;
|
|
#[macro_use]
|
|
extern crate smallvec;
|
|
|
|
pub mod autoderef;
|
|
pub mod errors;
|
|
pub mod infer;
|
|
pub mod traits;
|