about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve/assembly
AgeCommit message (Collapse)AuthorLines
2024-06-18Uplift the new trait solverMichael Goulet-1609/+0
2024-06-18SolverDelegateMichael Goulet-36/+37
2024-06-16Auto merge of #126505 - compiler-errors:no-vtable, r=lcnrbors-4/+5
Only compute vtable information during codegen This PR removes vtable information from the `Object` and `TraitUpcasting` candidate sources in the trait solvers, and defers the computation of relevant information to `Instance::resolve`. This is because vtables really aren't a thing in the trait world -- they're an implementation detail in codegen. Previously it was just easiest to tangle this information together since we were already doing the work of looking at all the supertraits in the trait solver, and specifically because we use traits to represent when it's possible to call a method via a vtable (`Object` candidate) and do upcasting (`Unsize` candidate). but I am somewhat suspicious we're doing a *lot* of extra work, especially in polymorphic contexts, so let's see what perf says.
2024-06-15Rollup merge of #126496 - compiler-errors:more-generics, r=lcnrGuillaume Gomez-49/+50
Make proof tree probing and `Candidate`/`CandidateSource` generic over interner `<TyCtxt<'tcx>>` is ugly, but will become `<I>` when things actually become generic. r? lcnr
2024-06-14Only compute vtable information during codegenMichael Goulet-4/+5
2024-06-14Add TyCtxt::is_lang_itemMichael Goulet-19/+19
2024-06-14Make Candidate generic over internerMichael Goulet-49/+50
2024-06-13Address nitsMichael Goulet-20/+26
- Remove the ValuePairs glob import - Make DummyPairs -> ValuePairs::Dummy and make it bug more - Fix WC - Make interner return `impl IntoIterator`s
2024-06-13Finish uplifting all of structural_traitsMichael Goulet-18/+19
2024-06-13Rework most of structural_traits to be Interner-agnosticMichael Goulet-103/+114
2024-06-04Rollup merge of #125750 - compiler-errors:expect, r=lcnr许杰友 Jieyou Xu (Joe)-1/+1
Align `Term` methods with `GenericArg` methods, add `Term::expect_*` * `Term::ty` -> `Term::as_type`. * `Term::ct` -> `Term::as_const`. * Adds `Term::expect_type` and `Term::expect_const`, and uses them in favor of `.ty().unwrap()`, etc. I could also shorten these to `as_ty` and then do `GenericArg::as_ty` as well, but I do think the `as_` is important to signal that this is a conversion method, and not a getter, like `Const::ty` is. r? types
2024-06-03Align Term methods with GenericArg methodsMichael Goulet-1/+1
2024-06-03check_is_object_safe -> is_object_safeMichael Goulet-1/+1
2024-06-01Uplift TypeRelation and RelateMichael Goulet-4/+4
2024-05-29Add lang item for AsyncFnKindHelper::UpvarsMichael Goulet-8/+1
2024-05-29Add lang item for Future::OutputMichael Goulet-12/+2
2024-05-28EvalCtxt::tcx() -> EvalCtxt::interner()Michael Goulet-24/+26
2024-05-22Rollup merge of #125259 - compiler-errors:fn-mut-as-a-treat, r=oli-obkLeón Orell Valerian Liehr-8/+5
An async closure may implement `FnMut`/`Fn` if it has no self-borrows There's no reason that async closures may not implement `FnMut` or `Fn` if they don't actually borrow anything with the closure's env lifetime. Specifically, #123660 made it so that we don't always need to borrow captures from the closure's env. See the doc comment on `should_reborrow_from_env_of_parent_coroutine_closure`: https://github.com/rust-lang/rust/blob/c00957a3e269219413041a4e3565f33b1f9d0779/compiler/rustc_hir_typeck/src/upvar.rs#L1777-L1823 If there are no such borrows, then we are free to implement `FnMut` and `Fn` as permitted by our closure's inferred `ClosureKind`. As far as I can tell, this change makes `async || {}` work in precisely the set of places they used to work before #120361. Fixes #125247. r? oli-obk
2024-05-19Make EvalCtxt generic over internerMichael Goulet-35/+38
2024-05-18Uplift inspect into rustc_type_irMichael Goulet-4/+4
2024-05-18Uplift GenericArgKind, CanonicalVarValues, QueryInputMichael Goulet-3/+2
and make NestedGoals generic
2024-05-18An async closure may implement FnMut/Fn if it has no self-borrowsMichael Goulet-8/+5
2024-05-16Uplift Goal to rustc_type_irMichael Goulet-2/+3
2024-05-16Make impls UpcastFrom, implement Upcast for UpcastFromMichael Goulet-1/+1
2024-05-16Rename ToPredicate for UpcastMichael Goulet-9/+7
2024-05-13Use a proper probe for shadowing implMichael Goulet-11/+8
2024-05-13Auto merge of #125076 - compiler-errors:alias-term, r=lcnrbors-2/+6
Split out `ty::AliasTerm` from `ty::AliasTy` Splitting out `AliasTerm` (for use in project and normalizes goals) and `AliasTy` (for use in `ty::Alias`) r? lcnr
2024-05-13split out AliasTy -> AliasTermMichael Goulet-2/+6
2024-05-13Remove `extern crate rustc_middle` from `rustc_trait_selection`.Nicholas Nethercote-0/+2
2024-05-12structurally important functions to `debug`lcnr-5/+5
2024-05-12solve: replace all `debug` with `trace`lcnr-15/+15
2024-05-02Record more kinds of things as impl where boundsMichael Goulet-8/+7
2024-05-02shallow resolve in orphan checklcnr-8/+4
2024-04-30Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-deadMatthias Krüger-0/+1
Remove many `#[macro_use] extern crate foo` items This requires the addition of more `use` items, which often make the code more verbose. But they also make the code easier to read, because `#[macro_use]` obscures where macros are defined. r? `@fee1-dead`
2024-04-29Actually use probes when needed and stop relying on existing outer probesMichael Goulet-92/+74
2024-04-29Make names more accurateMichael Goulet-7/+11
2024-04-29Remove `extern crate rustc_macros` from numerous crates.Nicholas Nethercote-0/+1
2024-04-25hir typeck: look into nested goalslcnr-11/+15
uses a `ProofTreeVisitor` to look into nested goals when looking at the pending obligations during hir typeck. Used by closure signature inference, coercion, and for async functions.
2024-04-16Add simple async drop glue generationzetanumbers-0/+7
Explainer: https://zetanumbers.github.io/book/async-drop-design.html https://github.com/rust-lang/rust/pull/121801
2024-04-08Don't rely on upvars being assigned just because coroutine-closure kind is ↵Michael Goulet-2/+6
assigned
2024-04-08Actually create ranged int types in the type system.Oli Scherer-1/+13
2024-04-05do not ICE in forced ambiguity if we get an errorlcnr-3/+10
2024-03-22Programmatically convert some of the pat ctorsMichael Goulet-6/+6
2024-03-22Rollup merge of #122829 - ShoyuVanilla:gen-block-impl-fused-iter, ↵Matthias Krüger-0/+9
r=compiler-errors Implement `FusedIterator` for `gen` block cc #117078
2024-03-22Implement `FusedIterator` for `gen` blockShoyu Vanilla-0/+9
2024-03-19Do binder folding eagerly in bound_coroutine_hidden_typesMichael Goulet-30/+5
I refuse to fix this in the old solver; its lazy instantiation of binders will be the end of me.
2024-03-19Don't ICE when encountering bound regions in generator interior typeMichael Goulet-1/+0
2024-03-18address nitsLukas Markeffsky-4/+5
2024-03-14remove unnecessary sized checksLukas Markeffsky-3/+4
2024-03-14clean up ADT sized constraint computationLukas Markeffsky-2/+12