about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/traits/util.rs
AgeCommit message (Collapse)AuthorLines
2025-05-02Use less rustc_type_ir in the compiler codebaseRomain Perier-1/+1
This commit does the following: - Replaces use of rustc_type_ir by rustc_middle in rustc_infer. - The DelayedMap type is exposed by rustc_middle so everything can be accessed through rustc_middle in a coherent manner. - API-layer traits, like InferCtxtLike, Interner or inherent::* must be accessed via rustc_type_ir, not rustc_middle::ty. For this reason these are not reexported by rustc_middle::ty. - Replaces use of ty::Interner by rustc_type_ir::Interner in rustc_trait_selection
2025-01-18Get rid of `ToPolyTraitRef`Michael Goulet-3/+3
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-2/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-08-29Stop using ty::GenericPredicates for non-predicates_of queriesMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-07Uplift elaborationMichael Goulet-345/+4
2024-07-06Rollup merge of #127386 - compiler-errors:uplift-outlives-components, r=lcnrMichael Goulet-1/+1
Uplift outlives components to `rustc_type_ir` We need this to uplift `push_outlives_components`, since the elaborator uses `push_outlives_components` to elaborate type outlives obligations and I want to uplift elaboration. This ends up reworking and inlining a fair portion of the `GenericArg::walk_shallow` function, whose only callsite was this one. I believe I got the logic correct, but may be worthwhile to look at it closely just in case. Unfortunately github was too dumb to understand that this is a rename + change -- I could also rework the git history to split the "copy the file over" part from the actual logical changes if that makes this easier to review. r? lcnr
2024-07-06Import via rustc_type_ir::outlivesMichael Goulet-1/+1
We could use rustc_middle::ty::outlives I guess?
2024-07-05Split out transitive_bounds_that_define_assoc_itemMichael Goulet-14/+25
2024-07-05Supertrait elaboration doesn't need to use PredicatesMichael Goulet-5/+5
2024-06-27Make queries more explicitMichael Goulet-4/+4
2024-06-12Stop passing traitref/traitpredicate by refMichael Goulet-2/+1
2024-05-17to_opt_poly_X_pred -> as_X_clauseMichael Goulet-1/+1
2024-05-16Make P parameter explicitMichael Goulet-3/+1
2024-05-16Rename ToPredicate for UpcastMichael Goulet-5/+5
2024-05-10More rename falloutMichael Goulet-1/+1
2024-05-10Rename some ObligationCauseCode variantsMichael Goulet-8/+6
2024-05-10Remove glob imports for ObligationCauseCodeMichael Goulet-7/+9
2024-03-22Use != Positive rather than == NegativeMichael Goulet-1/+1
Feels more complete, and for ImplPolarity has the side-effect of making sure we also handle reservation impls correctly
2024-03-22Split out ImplPolarity and PredicatePolarityMichael Goulet-1/+1
2024-02-12Dejargnonize substShoyu Vanilla-1/+2
2023-12-07add unused `NormalizesTo` predicatelcnr-44/+26
2023-11-21Remove ClosureKind predicate kindMichael Goulet-3/+0
2023-11-19Make regionck care about placeholders in outlives componentsMichael Goulet-0/+5
2023-11-13rename `ReLateBound` to `ReBound`lcnr-2/+2
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-10-18Make sure that non-pretty-printing usages are using the correct elaboratorMichael Goulet-2/+2
2023-10-18Simplify transitive_bounds_that_define_assoc_itemMichael Goulet-33/+28
2023-08-02Remove constness from `TraitPredicate`Deadbeef-5/+1
2023-07-19Document `PredicateSet::insert`Maybe Waffle-0/+7
I always forget what the `bool` means :/
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-2/+2
2023-07-03remove TypeWellFormedFromEnvMichael Goulet-3/+0
2023-06-29Make the Elaboratable trait take clausesMichael Goulet-40/+42
2023-06-26TypeWellFormedInEnvMichael Goulet-1/+1
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-2/+3
2023-06-22Expect clause moreMichael Goulet-4/+4
2023-06-22Migrate item_bounds to ty::ClauseMichael Goulet-0/+20
2023-06-19Fully fledged Clause typeMichael Goulet-0/+20
2023-06-19s/Clause/ClauseKindMichael Goulet-10/+10
2023-06-17Move ConstEvaluatable to ClauseMichael Goulet-1/+1
2023-06-17Move WF goal to clauseMichael Goulet-1/+1
2023-05-07Auto merge of #111161 - compiler-errors:rtn-super, r=cjgillotbors-4/+4
Support return-type bounds on associated methods from supertraits Support `T: Trait<method(): Bound>` when `method` comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds). The only wrinkle is that I have to extend `super_predicates_that_define_assoc_type` to look for *all* items, not just `AssocKind::Ty`. This will also be needed to support `feature(associated_const_equality)` as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.
2023-05-03Rename things to reflect that they're not item specificMichael Goulet-4/+4
2023-05-02Make negative trait bounds work with the old trait solverMichael Goulet-0/+4
2023-04-11Allow the elaborator to only filter to real supertraitsMichael Goulet-15/+26
2023-04-11Split implied and super predicate queriesMichael Goulet-1/+1
2023-04-11Split super_predicates_that_define_assoc_type query from super_predicates_ofMichael Goulet-4/+2
2023-04-06Get rid of elaborate_trait_ref{s} tooMichael Goulet-17/+7
2023-04-06Make elaborator genericMichael Goulet-92/+117
2023-03-26Don't elaborate non-obligations into obligationsMichael Goulet-35/+43