about summary refs log tree commit diff
path: root/compiler/rustc_next_trait_solver/src/solve/assembly
AgeCommit message (Collapse)AuthorLines
2025-09-30add testslcnr-1/+4
2025-09-29Fn-trait goals, eagerly instantiate binderlcnr-2/+3
to avoid overflow from proving `for<'a> opaque<'a>: Sized`
2025-09-18Auto merge of #145993 - lcnr:allow-calling-opaques, r=BoxyUwUbors-10/+30
`-Znext-solver` allow `ExprKind::Call` for not-yet defined opaques Based on https://github.com/rust-lang/rust/pull/146329. Revival of rust-lang/rust#140496. See the comment on `OpaqueTypesJank`. I've used the following document while working on this https://hackmd.io/Js61f8PRTcyaiyqS-fH9iQ. Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/181. It does introduce one subtle footgun we may want to handle before stabilization, opened https://github.com/rust-lang/trait-system-refactor-initiative/issues/230 for that. Also cc https://github.com/rust-lang/trait-system-refactor-initiative/issues/231 for deref and index operations r? `@BoxyUwU`
2025-09-18support calls on opaque types :<lcnr-10/+30
2025-09-17Remove `DynKind`León Orell Valerian Liehr-4/+4
2025-09-11incompletely prefer opaque type bounds when self type bottoms out in inferMichael Goulet-7/+130
2025-09-02Migrate more things in the new solver to specific `DefId`sChayim Refael Friedman-4/+4
2025-08-25Switch next solver to use a specific associated type for trait def idChayim Refael Friedman-38/+38
The compiler just puts `DefId` in there, but rust-analyzer uses different types for each kind of item.
2025-08-19Rollup merge of #145338 - lcnr:coroutine-witness-yikes, r=compiler-errors许杰友 Jieyou Xu (Joe)-18/+6
actually provide the correct args to coroutine witnesses rust-lang/rust#145194 accidentally provided all arguments of the closure to the witness, but the witness only takes the generic parameters of the defining scope: https://github.com/rust-lang/rust/blob/216cdb7b22b637cef75b7225c642cb7587192643/compiler/rustc_hir_typeck/src/closure.rs#L164 Fixes rust-lang/rust#145288
2025-08-14ignore head usages of ignored candidateslcnr-33/+66
2025-08-13`fn new_coroutine_witness_for_coroutine` woopslcnr-18/+6
2025-08-05we only merge candidates for trait and normalizes-to goalslcnr-30/+13
2025-08-04Rollup merge of #144694 - compiler-errors:with-self-ty, r=SparrowLiiStuart Cook-3/+3
Distinguish prepending and replacing self ty in predicates There are two kinds of functions called `with_self_ty`: 1. Prepends the `Self` type onto an `ExistentialPredicate` which lacks it in its internal representation. 2. Replaces the `Self` type of an existing predicate, either for diagnostics purposes or in the new trait solver when normalizing that self type. This PR distinguishes these two because I often want to only grep for one of them. Namely, let's call it `with_replaced_self_ty` when all we're doing is replacing the self type.
2025-08-03Auto merge of #144732 - lcnr:ignore-shadowed-impls, r=compiler-errorsbors-3/+24
dont assemble shadowed impl candidates Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/109. I've originally intended to fix this by supporting lazy reevaluation when rerunning cycles. This ended up being really difficult, see https://github.com/lcnr/search_graph for my notes used while working on this. It is also insufficient for the `rayon-hang-2.rs` test as we end up with goals which we need to rerun for all combinations of provisional results. While landing such an optimization in the future may still be desirable, it is very difficult and insufficient to fix these hangs. Also see the relevant [zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/rustc-rayon.20hang/near/527850058). I was previously opposed to avoiding assembling shadowed impls as it may prevent future improvements in this area, cc rust-lang/rust#141226. Going to track this and the reasoning behind it in https://github.com/rust-lang/trait-system-refactor-initiative/issues/226. r? `@BoxyUwU` `@compiler-errors`
2025-07-31Remove the witness type from coroutine argsMichael Goulet-3/+17
2025-07-31dont assemble shadowed impl candidateslcnr-3/+24
2025-07-30Distinguish appending and replacing self ty in predicatesMichael Goulet-3/+3
2025-07-05[perf] Skip walking into param-env component if it has no placeholder/re-varMichael Goulet-4/+9
2025-07-01Remove support for dyn*Michael Goulet-1/+0
2025-06-30Rollup merge of #143066 - compiler-errors:let-chain-solver, r=lcnrdianqk-10/+10
Use let chains in the new solver Self-explanatory Let chains are stable as of today r? lcnr
2025-06-27Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-deadMatthias Krüger-8/+8
New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
2025-06-27Use let chains in the new solverMichael Goulet-10/+10
2025-06-26Fix some fixmes that were waiting for let chainsYotam Ofek-9/+8
2025-06-26Change const trait bound syntax from ~const to [const]Oli Scherer-8/+8
2025-06-16trait_sel: `{Meta,Pointee}Sized` on `?Sized` typesDavid Wood-46/+44
Expand the automatic implementation of `MetaSized` and `PointeeSized` so that it is also implemented on non-`Sized` types, just not `ty::Foreign` (extern type).
2025-06-16trait_sel: `{Meta,Pointee}Sized` on `Sized` typesDavid Wood-0/+24
Introduce the `MetaSized` and `PointeeSized` traits as supertraits of `Sized` and initially implement it on everything that currently implements `Sized` to isolate any changes that simply adding the traits introduces.
2025-06-13TypeVisiting binders no longer requires TypeFolding its interiorMichael Goulet-1/+1
2025-06-13Replace escaping bound vars in ty/ct visiting, not binder visitingMichael Goulet-12/+35
2025-05-22Auto merge of #141396 - matthiaskrgr:rollup-feg050g, r=matthiaskrgrbors-2/+2
Rollup of 7 pull requests Successful merges: - #135562 (Add ignore value suggestion in closure body) - #139635 (Finalize repeat expr inference behaviour with inferred repeat counts) - #139668 (Handle regions equivalent to 'static in non_local_bounds) - #140218 (HIR ty lowering: Clean up & refactor the lowering of type-relative paths) - #140435 (use uX::from instead of _ as uX in non - const contexts) - #141130 (rustc_on_unimplemented cleanups) - #141286 (Querify `coroutine_hidden_types`) Failed merges: - #140247 (Don't build `ParamEnv` and do trait solving in `ItemCtxt`s when lowering IATs) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-21Fix FnOnce impl for AsyncFn/AsyncFnMut closures in new solverMichael Goulet-1/+1
2025-05-20Querify coroutine_hidden_typesMichael Goulet-2/+2
2025-05-15Rollup merge of #140712 - lcnr:normalization-gat-args, r=compiler-errorsMatthias Krüger-19/+19
normalization: avoid incompletely constraining GAT args We need to copy the behavior of #125214 in the new solver. This fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/202 which seems to be the cause of the regression in `deptypes`. r? ```@compiler-errors```
2025-05-12Fix typosomahs-1/+1
2025-05-08refactor `probe_and_consider_param_env_candidate`lcnr-15/+14
2025-05-08normalization: avoid incompletely constraining GAT argslcnr-11/+12
2025-05-07ReviewMichael Goulet-6/+18
2025-05-07Only prefer param-env candidates if they remain non-global after normMichael Goulet-23/+141
2025-04-29Treat `ManuallyDrop` as `~const Destruct`Oli Scherer-0/+3
2025-04-28Auto merge of #140388 - GuillaumeGomez:rollup-aj9o3ch, r=GuillaumeGomezbors-2/+2
Rollup of 7 pull requests Successful merges: - #140056 (Fix a wrong error message in 2024 edition) - #140220 (Fix detection of main function if there are expressions around it) - #140249 (Remove `weak` alias terminology) - #140316 (Introduce `BoxMarker` to improve pretty-printing correctness) - #140347 (ci: clean more disk space in codebuild) - #140349 (ci: use aws codebuild for the `dist-x86_64-linux` job) - #140379 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-28Rollup merge of #140249 - BoxyUwU:remove_weak_alias_terminology, r=oli-obkGuillaume Gomez-2/+2
Remove `weak` alias terminology I find the "weak" alias terminology to be quite confusing. It implies the existence of "strong" aliases (which do not exist) and I'm not really sure what about weak aliases is "weak". I much prefer "free alias" as the term. I think it's much more obvious what it means as "free function" is a well defined term that already exists in rust. It's also a little confusing given "weak alias" is already a term in linker/codegen spaces which are part of the compiler too. Though I'm not particularly worried about that as it's usually very obvious if you're talking about the type system or not lol. I'm also currently trying to write documentation about aliases and it's somewhat awkward/confusing to be talking about *weak* aliases, when I'm not really sure what the basis for that as the term actually *is*. I would also be happy to just find out there's a nice meaning behind calling them "weak" aliases :-) r? `@oli-obk` maybe we want a types MCP to decide on a specific naming here? or maybe we think its just too late to go back on this naming decision ^^'
2025-04-28AsyncDrop implementation using shim codegen of ↵Andrew Zhogin-8/+0
async_drop_in_place::{closure}, scoped async drop added.
2025-04-25handle specialization in the new trait solverlcnr-1/+72
uwu :3
2025-04-24Remove `weak` alias terminologyBoxy-2/+2
2025-04-18Don't assemble non-env/bound candidates if projection is rigidMichael Goulet-33/+54
2025-04-16Remove FIXME that is no longer relevantMichael Goulet-6/+0
2025-04-16Fix replacing supertrait aliases in ReplaceProjectionWithMichael Goulet-59/+122
2025-04-14normalize: prefer ParamEnv over AliasBoundlcnr-21/+30
2025-04-03Initial support for auto traits with default boundsBryanskiy-1/+5
2025-03-15Fold visit into tyMichael Goulet-2/+3
2025-03-15Squash fold into tyMichael Goulet-4/+5