about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils
AgeCommit message (Collapse)AuthorLines
2023-07-07Move some logic into a method on `OpaqueTypeCollector`Oli Scherer-29/+33
2023-07-07Remove one layer of nested matching on the same thingOli Scherer-55/+39
2023-07-07liar liar find_taits_declared_in_body on fireOli Scherer-10/+10
2023-07-07We don't need to track binders if we aren't normalizingOli Scherer-20/+1
2023-07-07Remove normalization from `opaque_types_defined_by`Oli Scherer-41/+2
2023-07-07Require TAITs to be mentioned in the signatures of functions that register ↵Oli Scherer-30/+194
hidden types for them
2023-07-06get rid of a bit more calls to poly_selectMichael Goulet-1/+1
2023-07-06add helper methods for accessing struct tailLukas Markeffsky-10/+3
2023-07-06sanity check field offsets in unsizeable structsLukas Markeffsky-0/+49
2023-07-06clean up struct layout codeLukas Markeffsky-32/+37
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-14/+16
2023-07-05Auto merge of #113210 - fee1-dead-contrib:effects-mvp, r=oli-obkbors-0/+2
Effects/keyword generics MVP This adds `feature(effects)`, which adds `const host: bool` to the generics of const functions, const traits and const impls. This will be used to replace the current logic around const traits. r? `@oli-obk`
2023-07-04include `host_effect_index` in `Generics`Deadbeef-0/+2
2023-07-04Replace `const_error` methods with `Const::new_error`Boxy-1/+1
2023-07-04Replace `mk_const` with `Const::new_x` methodsBoxy-13/+15
2023-07-04Auto merge of #113303 - compiler-errors:yeet-chalk, r=lcnrbors-117/+1
Remove chalk support from the compiler Removes chalk (`-Ztrait-solver=chalk`) from the compiler and prunes any dead code resulting from this, mainly: * Remove the chalk compatibility layer in `compiler/rustc_traits/src/chalk` * Remove the chalk flag `-Ztrait-solver=chalk` and its `TraitEngine` implementation * Remove `TypeWellFormedFromEnv` (and its many `bug!()` match arms) * Remove the chalk migration mode from compiletest * Remove the `chalkify` UI tests (do we want to keep any of these, but migrate them to `-Ztrait-solver=next`??) Fulfills rust-lang/types-team#93. r? `@jackh726`
2023-07-04Auto merge of #113215 - compiler-errors:rpitit-predicates-tweaks, r=spastorinobors-18/+1
Make RPITITs assume/require their parent method's predicates Removes a FIXME from the `param_env` query where we were manually adding the parent function's predicates to the RPITIT's assumptions. r? `@spastorino`
2023-07-03Remove chalk from the compilerMichael Goulet-117/+1
2023-07-03use `deeply_normalize` for `assumed_wf_types`lcnr-20/+57
2023-07-01Put `FnAbiError` behind reference to shrink resultNilstrieb-7/+10
The `FnAbi` is just a pointer, so the error type should not be bigger.
2023-07-01Put `LayoutError` behind reference to shrink resultNilstrieb-25/+42
`LayoutError` is 24 bytes, which is bigger than the `Ok` types, so let's shrink that.
2023-06-30RPITITs inherit method predicatesMichael Goulet-18/+1
2023-06-29Add bidirectional where clauses on RPITIT synthesized GATsSantiago Pastorino-12/+0
2023-06-29Do not remove previously added predicates in param_env, extend them insteadSantiago Pastorino-1/+3
2023-06-28Rollup merge of #112867 - compiler-errors:more-impl-source-nits, r=lcnrDylan DPC-3/+1
More `ImplSource` nits Even more clean-ups, I'll put this up in parallel with the `select_in_new_trait_solver` PR. r? ``@lcnr``
2023-06-27`thir`: Add `Become` expression kindMaybe Waffle-1/+3
2023-06-26TypeWellFormedInEnvMichael Goulet-10/+7
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-10/+11
2023-06-23Auto merge of #112891 - oli-obk:impl_trait_in_assoc_tys_cleanup, ↵bors-49/+85
r=compiler-errors Various impl trait in assoc tys cleanups r? `@compiler-errors` All commits except for the last are pure refactorings. 274dab5bd658c97886a8987340bf50ae57900c39 allows struct fields to participate in deciding whether a function has an opaque in its signature. best reviewed commit by commit
2023-06-23Rollup merge of #112810 - compiler-errors:dont-ice-on-bad-layout, r=wesleywiserMatthias Krüger-7/+28
Don't ICE on unnormalized struct tail in layout computation 1. We try to compute a `SizeSkeleton` even if a layout error occurs, but we really only need to do this if we get `LayoutError::Unknown`, since that means our type is too polymorphic to actually compute the full layout. If we have other errors, like `LayoutError::NormalizationError` or `LayoutError::Cycle`, then we can't really make any progress, since this represents an actual error. 2. Avoid using `normalize_erasing_regions` and `struct_tail_erasing_lifetimes` since those ICE on normalization errors, and since we may call `layout_of` in HIR typeck, we don't know for certain that we're on the happy path. Fixes #112736
2023-06-22Only walk the identity substituted version of struct fieldsOli Scherer-1/+22
2023-06-22Handle weak type aliases by immediately resolving them to their aliased typeOli Scherer-9/+14
2023-06-22ICE on types that should not be defining opaque typesOli Scherer-1/+3
2023-06-22Document what is going on in `opaque_types_defined_by`Oli Scherer-0/+3
2023-06-22Move some field extraction logic onto a method on `Node`Oli Scherer-7/+3
2023-06-22Re-use error code for duplicate errorOli Scherer-1/+1
2023-06-22Treat opaque types failing the signature defining scope check as defining, ↵Oli Scherer-2/+3
as we already errored and can hide subsequent errors this way.
2023-06-22Stop failing eagerly, and collect all opaque types even if some are erroneous.Oli Scherer-12/+6
2023-06-22Point to argument/return type instead of the whole function headerOli Scherer-6/+30
2023-06-22Only create the opaque collector once and visit it many timesOli Scherer-20/+10
2023-06-22Move `opaque_type_origin_unchecked` onto `TyCtxt` and re-use it where it was ↵Oli Scherer-1/+1
open coded
2023-06-21Don't substitute a GAT that has mismatched generics in OpaqueTypeCollectorMichael Goulet-30/+50
2023-06-21Rollup merge of #112759 - cjgillot:closure-names, r=oli-obkNilstrieb-5/+6
Make closure_saved_names_of_captured_variables a query. As we will start removing debuginfo during MIR optimizations, we need to keep them somewhere.
2023-06-20yeet ImplSource::TraitAlias tooMichael Goulet-3/+1
2023-06-19Better error messageMichael Goulet-1/+16
2023-06-19Don't ICE on unnormalized struct tail in layout computationMichael Goulet-7/+13
2023-06-19Store generator field names in GeneratorLayout.Camille GILLOT-4/+5
2023-06-19Make closure_saved_names_of_captured_variables a query.Camille GILLOT-1/+1
2023-06-19Promote unchecked_add/sub/mul/shl/shr to mir::BinOpScott McMurray-2/+3
2023-06-17Remove even more redundant builtin candidatesMichael Goulet-77/+60