rust/compiler/rustc_trait_selection/src/solve
Nicholas Nethercote fe843feaab Use fewer origins when creating type variables.
`InferCtxt::next_{ty,const}_var*` all take an origin, but the
`param_def_id` is almost always `None`. This commit changes them to just
take a `Span` and build the origin within the method, and adds new
methods for the rare cases where `param_def_id` might not be `None`.
This avoids a lot of tedious origin building.

Specifically:
- next_ty_var{,_id_in_universe,_in_universe}: now take `Span` instead of
  `TypeVariableOrigin`
- next_ty_var_with_origin: added

- next_const_var{,_in_universe}: takes Span instead of ConstVariableOrigin
- next_const_var_with_origin: added

- next_region_var, next_region_var_in_universe: these are unchanged,
  still take RegionVariableOrigin

The API inconsistency (ty/const vs region) seems worth it for the
large conciseness improvements.
2024-05-10 09:47:46 +10:00
..
assembly Record more kinds of things as impl where bounds 2024-05-02 21:56:14 -04:00
eval_ctxt Use fewer origins when creating type variables. 2024-05-10 09:47:46 +10:00
inspect Use fewer origins when creating type variables. 2024-05-10 09:47:46 +10:00
normalizes_to Record more kinds of things as impl where bounds 2024-05-02 21:56:14 -04:00
alias_relate.rs normalizes-to change from '1' to '0 to inf' steps 2024-04-04 12:39:58 +02:00
fulfill.rs Don't consider candidates with no failing where clauses 2024-05-06 11:32:50 -04:00
mod.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
normalize.rs Use fewer origins when creating type variables. 2024-05-10 09:47:46 +10:00
project_goals.rs track the source of nested goals 2023-12-18 08:47:29 +01:00
search_graph.rs NormalizesTo return nested goals 2024-03-18 15:53:16 +01:00
trait_goals.rs Record impl args in the InsepctCandiate rather than rematching during select 2024-05-06 14:17:22 -04:00