about summary refs log tree commit diff
path: root/compiler/rustc_next_trait_solver/src
AgeCommit message (Collapse)AuthorLines
2025-02-26Use Binder<Vec<T>> instead of Vec<Binder<T>> in new solverMichael Goulet-48/+38
2025-02-21Make sure we don't overrun the stack in canonicalizerMichael Goulet-2/+2
2025-02-19Make fewer crates depend on rustc_ast_irMichael Goulet-4/+4
2025-02-18Auto merge of #137235 - matthiaskrgr:rollup-2kjua2t, r=matthiaskrgrbors-8/+29
Rollup of 10 pull requests Successful merges: - #135711 (Do not ICE on default_field_value const with lifetimes) - #136599 (librustdoc: more usages of `Joined::joined`) - #136876 (Locking documentation updates) - #137000 (Deeply normalize item bounds in new solver) - #137126 (fix docs for inherent str constructors) - #137161 (Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions) - #137191 (Update mdbook and move error_index_generator) - #137203 (Improve MIR modification) - #137206 (Make E0599 a structured error) - #137218 (misc `layout_of` cleanup) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-18don't ICE for alias-relate goals with error termlcnr-1/+11
2025-02-17Prefer param-env candidates even when alias's trait bound isn't proven via ↵Michael Goulet-8/+29
param-env
2025-02-13adjust derive_errorlcnr-20/+0
2025-02-13rework pointee handling for the new rigid alias approachlcnr-67/+79
2025-02-13normalizes-to rework rigid alias handlinglcnr-93/+76
2025-02-13Use BikeshedGuaranteedNotDrop in unsafe binder type WF tooMichael Goulet-1/+1
2025-02-13Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validityMichael Goulet-0/+117
2025-02-08Rustfmtbjorn3-61/+89
2025-02-07Rollup merge of #136664 - WaffleLapkin:un-map_or-true, r=compiler-errorsMatthias Krüger-1/+1
replace one `.map_or(true, ...)` with `.is_none_or(...)` Randomly found while going through some of my old branches.
2025-02-06replace one `.map_or(true, ...)` with `.is_none_or(...)`Waffle Lapkin-1/+1
2025-02-06Rollup merge of #136069 - yotamofek:next-solver-slice, r=compiler-errorsMatthias Krüger-7/+5
Simplify slice indexing in next trait solver Unless I'm missing something: - no need to explicitly specify the end of the slice as the end of the index range - the `assert` is redundant since the indexing will panic for the same condition I think this change simplifies it a bit. Also replaced the `for` loop of `push`es with a call to `extend` with an iterator. Might improve performance since it knows how many elements will be added beforehand and can pre-reserve room? r? `@compiler-errors` , I think
2025-02-05Pass spans around new solverMichael Goulet-22/+56
2025-02-05Remove span from delegateMichael Goulet-4/+2
2025-01-30introduce `ty::Value`Lukas Markeffsky-5/+3
Co-authored-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2025-01-28Do not assume child bound assumptions for rigid aliasMichael Goulet-14/+49
2025-01-25Simplify slice indexing in next trait solverYotam Ofek-7/+5
2025-01-23Rollup merge of #135766 - lcnr:candidate-assembly-3, r=compiler-errorsMatthias Krüger-20/+28
handle global trait bounds defining assoc types This also fixes the compare-mode for - tests/ui/coherence/coherent-due-to-fulfill.rs - tests/ui/codegen/mono-impossible-2.rs - tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection.rs - tests/ui/nll/issue-61320-normalize.rs I first considered the alternative to always prefer where-bounds during normalization, regardless of how the trait goal has been proven by changing `fn merge_candidates` instead. https://github.com/rust-lang/rust/blob/ecda83b30f0f68cf5692855dddc0bc38ee8863fc/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs#L785 This approach is more restrictive than behavior of the old solver to avoid mismatches between trait and normalization goals. This may be breaking in case the where-bound adds unnecessary region constraints and we currently don't ever try to normalize an associated type. I would like to detect these cases and change the approach to exactly match the old solver if required. I want to minimize cases where attempting to normalize in more places causes code to break. r? `@compiler-errors`
2025-01-22Use `structurally_normalize` instead of manual `normalizes-to` goalsBoxy-23/+19
2025-01-20handle global trait bounds defining assoc typelcnr-2/+22
2025-01-20remove unnecessary collectionlcnr-18/+6
2025-01-19Run `clippy --fix` for `unnecessary_map_or` lintYotam Ofek-1/+1
2025-01-17new solver: prefer trivial builtin impls over where-clausesRémy Rakic-2/+26
for now, only builtin `Sized` impls are tracked as being `Trivial`
2025-01-14Prefer lower TraitUpcasting candidatesMichael Goulet-3/+5
2025-01-08Implement const Destruct in old solverMichael Goulet-0/+2
2025-01-06Recurse on GAT where clauses in fulfillment error proof tree visitorMichael Goulet-2/+2
2025-01-06Add derived causes for host effect predicatesMichael Goulet-1/+1
2025-01-03Also in the new solverMichael Goulet-18/+27
2024-12-22Begin to implement type system layer of unsafe bindersMichael Goulet-3/+37
2024-12-18update new solver candidate assemblylcnr-89/+180
2024-12-18canonicalizer: keep 'static in the param_envlcnr-40/+102
2024-12-11Rename projection_def_id to item_def_idMichael Goulet-1/+1
2024-12-05do not implement unsafe auto traits for types with unsafe fieldsJack Wrenn-0/+8
If a type has unsafe fields, its safety invariants are not simply the conjunction of its field types' safety invariants. Consequently, it's invalid to reason about the safety properties of these types in a purely structural manner — i.e., the manner in which `auto` traits are implemented. Makes progress towards #132922.
2024-11-28support revealing defined opaque post borrowcklcnr-33/+53
2024-11-23remove remaining references to `Reveal`lcnr-2/+1
2024-11-23no more Reveal :(lcnr-13/+9
2024-11-22Implement ~const Destruct in new solverMichael Goulet-4/+97
2024-11-21Rollup merge of #133218 - compiler-errors:const-opaque, r=fee1-deadMatthias Krüger-5/+2
Implement `~const` item bounds in RPIT an RPIT in a `const fn` is allowed to be conditionally const itself :) r? fee1-dead or reroll
2024-11-20Rip out built-in PointerLike implMichael Goulet-50/+0
2024-11-19Implement ~const Fn trait goals in the new solverMichael Goulet-17/+128
2024-11-19Rename implied_const_bounds to explicit_implied_const_boundsMichael Goulet-5/+2
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-1/+5
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-11-12Consolidate type system const evaluation under `traits::evaluate_const`Boxy-8/+8
mew
2024-11-03Rename the FIXMEs, remove a few that dont matter anymoreMichael Goulet-3/+1
2024-10-30Merge HostPolarity and BoundConstnessMichael Goulet-4/+7
2024-10-29remove outdated debug_assertionlcnr-3/+0
2024-10-29TypingMode :thinking:lcnr-87/+73