about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/assoc.rs
AgeCommit message (Collapse)AuthorLines
2023-03-29Walk return-position impl trait in trait deeply in associated_item_def_idsMichael Goulet-16/+19
2023-03-22Auto merge of #109497 - matthiaskrgr:rollup-6txuxm0, r=matthiaskrgrbors-4/+0
Rollup of 10 pull requests Successful merges: - #109373 (Set LLVM `LLVM_UNREACHABLE_OPTIMIZE` to `OFF`) - #109392 (Custom MIR: Allow optional RET type annotation) - #109394 (adapt tests/codegen/vec-shrink-panik for LLVM 17) - #109412 (rustdoc: Add GUI test for "Auto-hide item contents for large items" setting) - #109452 (Ignore the vendor directory for tidy tests.) - #109457 (Remove comment about reusing rib allocations) - #109461 (rustdoc: remove redundant `.content` prefix from span/a colors) - #109477 (`HirId` to `LocalDefId` cleanup) - #109489 (More general captures) - #109494 (Do not feed param_env for RPITITs impl side) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-22Do not feed param_env for RPITITs impl sideSantiago Pastorino-4/+0
2023-03-21RPITITs are DefKind::Opaque with new lowering strategyMichael Goulet-11/+13
2023-03-21IdentitySubsts::identity_for_item takes Into<DefId>Michael Goulet-1/+1
2023-03-21Use local key in providersMichael Goulet-13/+12
2023-03-20Rollup merge of #109277 - spastorino:new-rpitit-14, r=compiler-errorsMatthias Krüger-7/+3
Fix generics_of for impl's RPITIT synthesized associated type The only useful commit is the last one. This makes `generics_of` for the impl side RPITIT copy from the trait's associated type and avoid the fn on the impl side which was previously wrongly used. This solution is better but we still need to fix resolution of the generated generics. r? ``@compiler-errors``
2023-03-20Update some names and commentsMichael Goulet-24/+37
2023-03-17Fix generics_of for impl's RPITIT synthesized associated typeSantiago Pastorino-7/+3
2023-03-15Feed is_type_alias_impl_trait for RPITITs on the trait sideSantiago Pastorino-0/+2
2023-03-15Properly implement generics_of for traitsSantiago Pastorino-2/+31
2023-03-15Rename impl_trait_in_trait_parent to impl_trait_in_trait_parent_fnSantiago Pastorino-1/+1
2023-03-14Make fns from other crates with RPITIT workSantiago Pastorino-0/+6
2023-03-13Don't opt_rpitit_info as a separate queryMichael Goulet-11/+7
2023-03-12Auto merge of #108700 - spastorino:new-rpitit-impl-side-2, r=compiler-errorsbors-11/+49
Make RPITITs simple cases work when using lower_impl_trait_in_trait_to_assoc_ty r? `@compiler-errors` It's probably best reviewed commit by commit.
2023-03-08Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholkbors-3/+2
Do not implement HashStable for HashSet (MCP 533) This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order. The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-06Implement inferred_outlives_of for impl side RPITITs assoc typeSantiago Pastorino-0/+3
2023-03-06Implement explicit_predicates_of for impl side RPITITs assoc typeSantiago Pastorino-0/+6
2023-03-06Implement generics_of for impl side RPITITs assoc typeSantiago Pastorino-6/+34
2023-03-06Implement param_env for RPITITs assoc typeSantiago Pastorino-0/+4
2023-03-06Properly implement explicit_item_bounds for RPITITs trait assoc tySantiago Pastorino-3/+0
2023-03-06Add tcx::lower_impl_trait_in_trait_to_assoc_ty to avoid accessing through ↵Santiago Pastorino-2/+2
sess.opts.unstable_opts
2023-03-05Auto merge of #108351 - petrochenkov:rmdit, r=cjgillotbors-1/+1
rustc_middle: Remove trait `DefIdTree` This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-02Feed queries on impl side for RPITITs when using ↵Santiago Pastorino-5/+65
lower_impl_trait_in_trait_to_assoc_ty
2023-03-02rustc_middle: Remove trait `DefIdTree`Vadim Petrochenkov-1/+1
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-01Make associated_item_def_ids for traits use an unstable option to also ↵Santiago Pastorino-5/+89
return associated types for RPITITs
2023-03-01Fix typo in docsSantiago Pastorino-1/+1
2023-03-01Use DefIdMap instead of FxHashMap for impl_item_implementor_ids query.Michael Woerister-3/+2
2023-02-21Rollup merge of #108141 - spastorino:add_rpitit_queries, r=compiler-errorsDylan DPC-2/+101
Add rpitit queries This is part of the changes we are making to lower RPITITs as an associated type. The rest of the stuff will follow under a `-Z` flag. I still need to add comments to the code, explain stuff and also I'd need to avoid encoding in metadata when rpitit queries return `&[]` r? `@compiler-errors`
2023-02-19Document associated_item methodsSantiago Pastorino-0/+11
2023-02-19Make associated_items_for_impl_trait_in_trait handle impl traits on implsSantiago Pastorino-18/+60
2023-02-19Add associated_item_for_impl_trait_in_trait querySantiago Pastorino-6/+18
2023-02-19Add associated_items_for_impl_trait_in_trait querySantiago Pastorino-2/+36
2023-02-15Copy `ty::AssocItem` all other the placeMaybe Waffle-1/+1
2023-02-05rustc_metadata: Encode/decode some `LazyArray`s without an `Option`Vadim Petrochenkov-3/+6
Also add asserts to decoding `LazyArray`s with `Option`
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-8/+8
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-1/+1
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-08-01Remove trait_of_item query.Camille GILLOT-8/+0
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-17/+8
2022-08-01Remove visibility from AssocItem.Camille GILLOT-8/+2
2022-08-01Store associated item defaultness in impl_defaultness.Camille GILLOT-2/+0
2022-01-19Store a `Symbol` instead of an `Ident` in `AssocItem`Aaron Hill-2/+2
This is the same idea as #92533, but for `AssocItem` instead of `VariantDef`/`FieldDef`. With this change, we no longer have any uses of `#[stable_hasher(project(...))]`
2022-01-15Return a LocalDefId in get_parent_item.Camille GILLOT-2/+1
2022-01-08Link impl items to corresponding trait items in late resolver.Camille GILLOT-104/+2
2022-01-07Add query to avoid name comparison in `leaf_def`Matthew Jasper-0/+9
2022-01-07Move associated_item* providers to their own moduleMatthew Jasper-0/+230