about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/traits/mod.rs
AgeCommit message (Collapse)AuthorLines
2025-06-25Remove some glob imports from the type systemMichael Goulet-2/+0
2025-04-14Derive Obligation's fold implsMichael Goulet-1/+6
2025-03-23Obligation::as_goalMichael Goulet-6/+6
2024-10-12Swap PredicateObligation to ThinVecGnomedDev-1/+2
2024-10-12Swap Vec<PredicateObligation> to type aliasGnomedDev-0/+2
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-2/+2
2024-08-27Add `warn(unreachable_pub)` to `rustc_infer`.Nicholas Nethercote-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-8/+6
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-21Move all error reporting into rustc_trait_selectionMichael Goulet-1/+0
2024-06-11Get rid of PredicateObligationsMichael Goulet-2/+0
2024-06-03Nits and formattingMichael Goulet-1/+1
2024-06-03Move FulfillmentErrorCode to rustc_trait_selection tooMichael Goulet-20/+1
2024-06-03Make TraitEngines generic over errorMichael Goulet-32/+2
2024-06-03Remove unnecessary extension traitMichael Goulet-1/+1
2024-05-18Uplift GenericArgKind, CanonicalVarValues, QueryInputMichael Goulet-2/+2
and make NestedGoals generic
2024-05-16Uplift Goal to rustc_type_irMichael Goulet-6/+10
2024-05-16Rename ToPredicate for UpcastMichael Goulet-10/+6
2024-05-13split out AliasTy -> AliasTermMichael Goulet-1/+1
2024-05-10More rename falloutMichael Goulet-1/+1
2024-05-10rename some variants in FulfillmentErrorCodeMichael Goulet-8/+8
2024-05-02Use ObligationCtxt in favor of TraitEngine in many placesMichael Goulet-0/+12
2024-04-29Remove `extern crate rustc_data_structures` from numerous crates.Nicholas Nethercote-1/+1
2024-04-18Simplify `static_assert_size`s.Nicholas Nethercote-1/+1
We want to run them on all 64-bit platforms.
2024-04-03Check `x86_64` size assertions on `aarch64`, tooZalathar-1/+1
This makes it easier for contributors on aarch64 workstations (e.g. Macs) to notice when these assertions have been violated.
2024-03-22Split out ImplPolarity and PredicatePolarityMichael Goulet-1/+1
2024-02-29distinguish recursion limit based overflow for diagnosticslcnr-4/+6
also change the number of allowed fixpoint steps to be fixed instead of using the `log` of the total recursion depth.
2024-01-19Add trait obligation tracking to FulfillCtxt and expose FnCtxt in ↵Gavin Gray-0/+8
rustc_infer using callback. Pass each obligation to an fn callback with its respective inference context. This avoids needing to keep around copies of obligations or inference contexts. Specify usability of inspect_typeck in comment.
2024-01-12Remove redundant Code from FulfillmentErrorCode variantsMichael Goulet-7/+6
2023-12-14update use of feature flagslcnr-1/+1
2023-10-22use visibility to check unused imports and delete some stmtsbohan-1/+0
2023-08-09Ignore `cause` and `recursion_depth` in `Obligation::{eq,hash}`.Nicholas Nethercote-1/+23
This gives massive (~7x) compile time and memory usage reductions for the trait system stress test in https://github.com/rust-lang/rustc-perf/pull/1680.
2023-08-02Remove constness from `TraitPredicate`Deadbeef-7/+0
2023-07-27Remove `constness` from `ParamEnv`Deadbeef-9/+0
2023-07-06Separate select calls that don't need a binderMichael Goulet-0/+1
2023-07-06TraitObligation -> PolyTraitObligationMichael Goulet-3/+3
2023-06-19s/Clause/ClauseKindMichael Goulet-2/+2
2023-04-21Break up long function in trait selection error reportingBryan Garza-1/+1
- Move blocks of code into their own functions - Replace a few function argument types with their type aliases
2023-04-16use matches! macro in more placesMatthias Krüger-4/+4
2023-04-10Report overflows gracefully with new solverMichael Goulet-1/+5
2023-03-21evaluate: improve and fix recursion depth handlinglcnr-0/+10
2023-03-10Move some solver stuff to middleMichael Goulet-0/+6
2023-01-23fix: use LocalDefId instead of HirId in trait resVincenzo Palazzo-1/+2
use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-2/+2
2022-11-16Convert predicates into Predicate in the Obligation constructorOli Scherer-13/+16
2022-09-22Rollup merge of #102037 - jyn514:normalize-docs, r=lcnrDylan DPC-0/+2
Make cycle errors recoverable In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, ```@jackh726``` has said we need to be careful about overflow errors: https://github.com/rust-lang/rust/pull/91430#issuecomment-983997013 > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered. Helps with https://github.com/rust-lang/rust/issues/81091. r? ```@lcnr``` cc ```@matthewjasper```
2022-09-19Make cycle errors recoverableJoshua Nelson-0/+2
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, `@jackh726` has said we need to be careful about overflow errors: > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
2022-09-16remap ParamEnv with obligationDeadbeef-0/+8
2022-05-10Remove `clone_code` methodOli Scherer-1/+1
2022-05-10Move an extension trait method onto the type directly and reuse itOli Scherer-1/+8
2022-02-15Overhaul `Const`.Nicholas Nethercote-1/+1
Specifically, rename the `Const` struct as `ConstS` and re-introduce `Const` as this: ``` pub struct Const<'tcx>(&'tcx Interned<ConstS>); ``` This now matches `Ty` and `Predicate` more closely, including using pointer-based `eq` and `hash`. Notable changes: - `mk_const` now takes a `ConstS`. - `Const` was copy, despite being 48 bytes. Now `ConstS` is not, so need a we need separate arena for it, because we can't use the `Dropless` one any more. - Many `&'tcx Const<'tcx>`/`&Const<'tcx>` to `Const<'tcx>` changes - Many `ct.ty` to `ct.ty()` and `ct.val` to `ct.val()` changes. - Lots of tedious sigil fiddling.