1
Fork 0
rust/compiler/rustc_hir_analysis/src
Nicholas Nethercote 022c0ce947 Remove NamedVarMap.
`NamedVarMap` is extremely similar to `ResolveBoundVars`. The former
contains two `UnordMap<ItemLocalId, T>` fields (obscured behind
`ItemLocalMap` typedefs). The latter contains two
`SortedMap<ItemLocalId, T>` fields. We construct a `NamedVarMap` and
then convert it into a `ResolveBoundVars` by sorting the `UnordMap`s,
which is unnecessary busywork.

This commit removes `NamedVarMap` and constructs a `ResolveBoundVars`
directly. `SortedMap` and `NamedVarMap` have slightly different
perf characteristics during construction (e.g. speed of insertion) but
this code isn't hot enough for that to matter.

A few details to note.
- A `FIXME` comment is removed.
- The detailed comments on the fields of `NamedVarMap` are copied to
  `ResolveBoundVars` (which has a single, incorrect comment).
- `BoundVarContext::map` is renamed.
- `ResolveBoundVars` gets a derived `Default` impl.
2025-01-30 09:39:52 +11:00
..
check visit_x_unambig 2025-01-23 06:01:36 +00:00
coherence Rollup merge of #135816 - BoxyUwU:root_normalizes_to_goal_ice, r=lcnr 2025-01-22 19:29:39 +01:00
collect Remove NamedVarMap. 2025-01-30 09:39:52 +11:00
errors Clarify implicit captures for RPITIT 2024-10-10 11:46:51 -07:00
hir_ty_lowering Rollup merge of #135971 - compiler-errors:self-projection, r=fmease 2025-01-25 08:03:33 +01:00
impl_wf_check Fix const specialization 2024-12-02 22:21:53 +00:00
outlives Implement const effect predicate in new solver 2024-10-24 09:46:36 +00:00
variance Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00
autoderef.rs Rename structurally_normalize to structurally_normalize_ty 2025-01-22 07:04:53 +00:00
bounds.rs Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
check_unused.rs Remove #[macro_use] extern crate tracing from rustc_hir_analysis. 2024-08-30 17:14:59 +10:00
collect.rs visit_x_unambig 2025-01-23 06:01:36 +00:00
constrained_generic_params.rs Remove #[macro_use] extern crate tracing from rustc_hir_analysis. 2024-08-30 17:14:59 +10:00
delegation.rs Effects cleanup 2024-10-26 10:19:07 +08:00
errors.rs remove support for the #[start] attribute 2025-01-21 06:59:15 -07:00
hir_wf_check.rs visit_x_unambig 2025-01-23 06:01:36 +00:00
impl_wf_check.rs footnote to ordinary comment 2025-01-06 07:37:52 +01:00
lib.rs use fmt::from_fn in more places, instead of using structs that impl formatting traits 2025-01-24 14:45:56 +00:00