about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/collect
AgeCommit message (Collapse)AuthorLines
2024-11-28uplift fold_regions to rustc_type_irlcnr-1/+2
2024-11-27Address review commentsMichael Goulet-68/+74
2024-11-27Handle bounds that come from the trait itselfMichael Goulet-27/+43
2024-11-27Robustify and genericize RTN resolution in RBVMichael Goulet-33/+86
2024-11-25Refactor `where` predicates, and reserve for attributes supportFrank King-16/+20
2024-11-21Rollup merge of #133218 - compiler-errors:const-opaque, r=fee1-deadMatthias Krüger-3/+10
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-19Implement ~const opaquesMichael Goulet-1/+8
2024-11-19Rename implied_const_bounds to explicit_implied_const_boundsMichael Goulet-2/+2
2024-11-19Introduce `min_generic_const_args` and directly represent pathsNoah Lev-2/+3
Co-authored-by: Boxy UwU <rust@boxyuwu.dev> Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2024-11-10Deny capturing late-bound ty/ct params in nested opaquesMichael Goulet-10/+27
2024-11-10Revert "Skip late-bound lifetimes when crossing an AnonConst."Michael Goulet-12/+2
This reverts commit a7f609504c92c9912b61025ae26a5404d3ee4311.
2024-11-05Auto merge of #132580 - compiler-errors:globs, r=Noratriebbors-2/+2
Remove unnecessary pub enum glob-imports from `rustc_middle::ty` We used to have an idiom in the compiler where we'd prefix or suffix all the variants of an enum, for example `BoundRegionKind`, with something like `Br`, and then *glob-import* that enum variant directly. `@noratrieb` brought this up, and I think that it's easier to read when we just use the normal style `EnumName::Variant`. This PR is a bit large, but it's just naming. The only somewhat opinionated change that this PR does is rename `BorrowKind::Imm` to `BorrowKind::Immutable` and same for the other variants. I think these enums are used sparingly enough that the extra length is fine. r? `@noratrieb` or reassign
2024-11-04ty::BrK -> ty::BoundRegionKind::KMichael Goulet-2/+2
2024-11-04find the generic container rather than simply looking up for the assoc with ↵bohan-8/+2
const arg
2024-11-02Rollup merge of #132466 - cjgillot:opaque-late, r=compiler-errorsMatthias Krüger-3/+20
Account for late-bound depth when capturing all opaque lifetimes. Fixes https://github.com/rust-lang/rust/issues/132429 r? ````@compiler-errors````
2024-11-01Skip late-bound lifetimes when crossing an AnonConst.Camille GILLOT-2/+12
2024-11-01Account for late-bound depth when capturing all opaque lifetimes.Camille GILLOT-1/+8
2024-10-31Double check the lowered predicates in type_param_predicatesMichael Goulet-7/+24
2024-10-31Make SelfTraitThatDefines a tighter filterMichael Goulet-21/+45
2024-10-31Make predicate filter in `probe_ty_param_bounds_in_generics` more explicitMichael Goulet-17/+17
2024-10-31Auto merge of #132377 - matthiaskrgr:rollup-3p1c6hs, r=matthiaskrgrbors-3/+10
Rollup of 3 pull requests Successful merges: - #132368 (Remove `do_not_const_check` from `Iterator` methods) - #132373 (Make sure `type_param_predicates` resolves correctly for RPITIT) - #132374 (Remove dead code stemming from the old effects desugaring) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-31Rollup merge of #132374 - fmease:rm-dead-eff-code, r=compiler-errorsMatthias Krüger-3/+0
Remove dead code stemming from the old effects desugaring r? project-const-traits
2024-10-30Remove dead code stemming from the old effects desugaringLeón Orell Valerian Liehr-3/+0
2024-10-30Make sure type_param_predicates resolves correctly for RPITITMichael Goulet-0/+10
2024-10-30Rollup merge of #132344 - compiler-errors:same-thing, r=lcnrJubilee-6/+6
Merge `HostPolarity` and `BoundConstness` They're basically the same thing, and I think `BoundConstness` is easier to use. r? fee1-dead or reassign
2024-10-30Merge HostPolarity and BoundConstnessMichael Goulet-6/+6
2024-10-30Actually capture all in-scope lifetimes.Camille GILLOT-43/+29
2024-10-30Review comments.Camille GILLOT-1/+1
2024-10-30Adapt comments.Camille GILLOT-12/+12
2024-10-30Remap impl-trait lifetimes on HIR instead of AST lowering.Camille GILLOT-110/+289
2024-10-29Rollup merge of #132194 - compiler-errors:rpitit-super-wc, r=spastorinoJubilee-14/+2
Collect item bounds for RPITITs from trait where clauses just like associated types We collect item bounds from trait where clauses for *associated types*, i.e. this: ```rust trait Foo where Self::Assoc: Send { type Assoc; } ``` Becomes this: ```rust trait Foo { type Assoc: Send; } ``` Today, with RPITITs/AFIT and return-type notation, we don't do that, i.e.: ```rust trait Foo where Self::method(..): Send { fn method() -> impl Sized; } fn is_send(_: impl Send) {} fn test<T: Foo>() { is_send(T::method()); } ``` ...which fails on nightly today. Turns out it's super easy to fix this, and we just need to use the `associated_type_bounds` lowering function in `explicit_item_bounds_with_filter`, which has that logic baked in.
2024-10-27Rollup merge of #132043 - compiler-errors:simplify-rbv, r=cjgillotMatthias Krüger-79/+75
Simplify param handling in `resolve_bound_vars` I always found the flow of the `ResolvedArg` constructors to be a bit confusing; turns out they're also kinda redundantly passing around their data, too. Also, deduplicate some code handling early-bound var to late-bound var conversion between return type notation's two styles: `where <T as Trait>::method(..): Bound` and `where T: Trait<method(..): Bound>`.
2024-10-26Collect item bounds for RPITITs from trait where clauses just like ↵Michael Goulet-14/+2
associated types
2024-10-26Effects cleanupDeadbeef-16/+8
- removed extra bits from predicates queries that are no longer needed in the new system - removed the need for `non_erasable_generics` to take in tcx and DefId, removed unused arguments in callers
2024-10-24Be better at enforcing that const_conditions is only called on const itemsMichael Goulet-60/+20
2024-10-24Implement const effect predicate in new solverMichael Goulet-9/+266
2024-10-24Remove associated type based effects logicMichael Goulet-50/+4
2024-10-23nightly feature tracking: get rid of the per-feature bool fieldsRalf Jung-7/+7
2024-10-22Deduplicate handling of early-bound params in RTNMichael Goulet-22/+29
2024-10-22Simplify confusing ResolvedArg constructorsMichael Goulet-57/+46
2024-10-20Inline lower_mono_bounds into lower_poly_boundsMichael Goulet-8/+15
2024-10-20Make LowerPolyBounds take an IntoIteratorMichael Goulet-2/+2
2024-10-19Use PredicateFilter instead of OnlySelfBoundsMichael Goulet-36/+4
2024-10-14Move trait bound modifiers into hir::PolyTraitRefMichael Goulet-3/+3
2024-10-04Simplify bound var resolution.Camille GILLOT-29/+27
2024-10-04rm `ItemKind::OpaqueTy`Noah Lev-128/+90
This introduce an additional collection of opaques on HIR, as they can no longer be listed using the free item list.
2024-10-02Move in_trait into OpaqueTyOriginMichael Goulet-41/+49
2024-10-02Use named fields for OpaqueTyOriginMichael Goulet-6/+8
2024-10-02Remove redundant in_trait from hir::TyKind::OpaqueDefMichael Goulet-2/+2
2024-09-27properly elaborate effects implied bounds for super traitsDeadbeef-26/+3