about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
AgeCommit message (Collapse)AuthorLines
2023-07-07Remove variances_of on RPITIT gats, remove its one use-caseMichael Goulet-9/+3
2023-07-06Do not assert >1 RPITITs on collect_return_position_impl_trait_in_trait_tysSantiago Pastorino-5/+7
2023-07-06add helper methods for accessing struct tailLukas Markeffsky-1/+1
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-199/+239
2023-07-05Auto merge of #113210 - fee1-dead-contrib:effects-mvp, r=oli-obkbors-5/+25
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-05Only use a single loop over the associated typesOli Scherer-5/+2
2023-07-05Prefer `retain` over hand-rolling an inefficient version of itOli Scherer-7/+3
2023-07-05tidy: move a large function out of an even larger fileOli Scherer-406/+418
2023-07-05Lint now-unnecessary associated type boundsOli Scherer-4/+30
2023-07-05Don't require associated types with `Self: Sized` bounds in `dyn Trait` objectsOli Scherer-0/+10
2023-07-04include `host_effect_index` in `Generics`Deadbeef-5/+21
2023-07-04Replace `const_error` methods with `Const::new_error`Boxy-11/+11
2023-07-04Replace `mk_const` with `Const::new_x` methodsBoxy-13/+15
2023-07-04add testDeadbeef-2/+6
2023-07-04Auto merge of #113303 - compiler-errors:yeet-chalk, r=lcnrbors-6/+3
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-3/+16
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 TypeWellFormedFromEnvMichael Goulet-6/+3
2023-07-03Rollup merge of #113286 - fmease:iat-dont-select-if-not-enabled, ↵Guillaume Gomez-5/+9
r=compiler-errors Don't perform selection if inherent associated types are not enabled Fixes #113265. As discussed r? `@compiler-errors`
2023-07-03Don't perform selection if IATs are not enabledLeón Orell Valerian Liehr-5/+9
2023-07-03use `deeply_normalize` for `assumed_wf_types`lcnr-21/+27
2023-07-01Rollup merge of #113182 - compiler-errors:rpit-stricter-captures, r=oli-obkMatthias Krüger-32/+116
Error when RPITITs' hidden types capture more lifetimes than their trait definitions This implements a stricter set of captures rules for RPITITs. They now may only capture: 1. Lifetimes from the impl header (both the self type and any trait substs -- we may want to restrict just to the self type's lifetimes, but the PR makes that easy to do, too) 2. Lifetimes mentioned by the `impl Trait` in the trait method's definition. Namely, they may not mention lifetimes from the method (early or late) that are not mentioned in the `impl Trait`. cc #105258 which I think was trying to do this too, though I'm not super familiar with what exactly differs from that or why that one was broken. cc #112194 (doesn't fix this issue per se, because it's still an open question, but I think this is objectively better than the status quo, and gets us closer to resolving that issue.) Technically is a fix for the ICE in #108580, but it turns that issue into an error now. We can decide separately whether or not nested RPITITs should capture lifetimes from their parents. r? ``@oli-obk``
2023-07-01Auto merge of #113154 - lcnr:better-probe-check, r=compiler-errorsbors-3/+3
change snapshot tracking in fulfillment contexts use the exact snapshot number to prevent misuse even when created inside of a snapshot
2023-06-30RPITITs inherit method predicatesMichael Goulet-2/+14
2023-06-30use explicit predicatesMichael Goulet-1/+2
2023-06-30Rollup merge of #113171 - spastorino:new-rpitit-25, r=compiler-errorsMatthias Krüger-9/+15
Properly implement variances_of for RPITIT GAT This fixes some of the issues found by crater run in https://github.com/rust-lang/rust/pull/112988#issuecomment-1610019572 r? ``@compiler-errors``
2023-06-30Rollup merge of #113071 - ↵Matthias Krüger-6/+74
compiler-errors:no-parent-non-lifetime-args-in-apit, r=eholk Account for late-bound vars from parent arg-position impl trait We should be reporting an error like we do for late-bound args coming from a parent APIT. Fixes #113016
2023-06-30Flip the order of binder instantiation for better diagnosticsMichael Goulet-10/+7
2023-06-30Error for RPITIT hidden tys that capture more than their trait defnMichael Goulet-22/+109
2023-06-29Properly implement variances_of for RPITIT GATSantiago Pastorino-9/+15
2023-06-29Add bidirectional where clauses on RPITIT synthesized GATsSantiago Pastorino-2/+56
2023-06-29Intern OpaqueTy on ItemKind::OpaqueTySantiago Pastorino-6/+6
2023-06-29Extract compute_bidirectional_outlives_predicates fnSantiago Pastorino-33/+51
2023-06-29change snapshot tracking in fulfillment contextslcnr-3/+3
2023-06-28Auto merge of #112629 - compiler-errors:atb-imply, r=jackh726bors-101/+84
Make associated type bounds in supertrait position implied `trait A: B<Assoc: C> {}` should be able to imply both `Self: B` and `<Self as B>::Assoc: C`. Adjust the way that we collect implied predicates to do so. Fixes #112573 Fixes #112568
2023-06-27Rollup merge of #113084 - WaffleLapkin:less_map_or, r=NilstriebMatthias Krüger-5/+5
Simplify some conditions r? `@Nilstrieb` Some things taken out of my `is_none_or` pr.
2023-06-27pass PredicateFilter to compute_boundsMichael Goulet-72/+51
2023-06-27Make associated type bounds in supertrait position impliedMichael Goulet-50/+54
2023-06-27Simplify some conditionsMaybe Waffle-5/+5
2023-06-26TypeWellFormedInEnvMichael Goulet-3/+5
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-196/+139
2023-06-26migrate lifetime tooMichael Goulet-6/+11
2023-06-26Account for late-bound vars from parent arg-position impl traitMichael Goulet-0/+63
2023-06-25Rollup merge of #113036 - TaKO8Ki:fix-112094, r=compiler-errorsMatthias Krüger-1/+1
Accept `ReStatic` for RPITIT Fixes #112094 Regression in https://github.com/rust-lang/rust/commit/8216b7f22934cea2422c79565df9c30ac8db93e0 If there is a better suggestion, I will go with that.
2023-06-26accept `ReStatic` for RPITITTakayuki Maeda-1/+1
add an ui test for #112094
2023-06-23Rollup merge of #112983 - spastorino:new-rpitit-23, r=compiler-errorsMichael Goulet-6/+14
Fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty This avoid suggesting the associated types generated for RPITITs when the one the code refers to doesn't exist and rustc looks for a suggestion. r? `@compiler-errors`
2023-06-23Rollup merge of #112981 - spastorino:new-rpitit-22, r=compiler-errorsMichael Goulet-1/+1
Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty This just adjust the way we check for RPITITs and uses the new helper method to do the "old" and "new" check at once. r? `@compiler-errors`
2023-06-23Auto merge of #112891 - oli-obk:impl_trait_in_assoc_tys_cleanup, ↵bors-4/+4
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-23Fix associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-tySantiago Pastorino-6/+14
2023-06-23Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-tySantiago Pastorino-1/+1
2023-06-22migrate inferred_outlives_of to ClauseMichael Goulet-5/+7