1
Fork 0
rust/compiler/rustc_hir_analysis/src
Michael Goulet 5ce6311f34
Rollup merge of #106403 - compiler-errors:rename-hir-methods, r=cjgillot
Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent`

The `hir::Map::get_parent_node` function doesn't return a `Node`, and I think that's quite confusing. Let's rename it to something that sounds more like something that gets the parent hir id => `hir::Map::parent_id`. Same with `find_parent_node` => `opt_parent_id`.

Also, combine `hir.get(hir.parent_id(hir_id))` and similar `hir.find(hir.parent_id(hir_id))` function into new functions that actually retrieve the parent node in one call. This last commit is the only one that might need to be looked at closely.
2023-01-04 20:36:28 -08:00
..
astconv get_parent and find_parent 2023-01-04 00:43:13 +00:00
check Rollup merge of #106221 - Nilstrieb:rptr-more-like-ref-actually, r=compiler-errors 2022-12-29 13:16:04 +01:00
coherence Rollup merge of #106353 - lukas-code:reduce-red-lines-in-my-ide, r=wesleywiser 2023-01-03 17:19:27 -08:00
collect get_parent and find_parent 2023-01-04 00:43:13 +00:00
impl_wf_check Auto merge of #106129 - compiler-errors:compare_method-tweaks, r=BoxyUwU 2022-12-28 13:07:30 +00:00
outlives rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
structured_errors rename find_parent_node to opt_parent_id 2023-01-04 00:43:13 +00:00
variance Prevent the creation of TraitRef without dedicated methods 2022-12-14 15:36:39 +00:00
bounds.rs Stop passing the self-type as a separate argument. 2022-11-21 20:39:46 +00:00
check_unused.rs Remove useless filter in unused extern crate check. 2022-12-03 09:23:03 +00:00
collect.rs Rollup merge of #106403 - compiler-errors:rename-hir-methods, r=cjgillot 2023-01-04 20:36:28 -08:00
constrained_generic_params.rs Combine projection and opaque into alias 2022-12-13 17:48:55 +00:00
errors.rs Ensure async trait impls are async (or otherwise return an opaque type) 2022-12-14 16:38:21 -08:00
hir_wf_check.rs Convert predicates into Predicate in the Obligation constructor 2022-11-16 09:25:19 +00:00
impl_wf_check.rs Rename some OwnerId fields. 2022-10-29 20:28:38 +11:00
lib.rs Make ObligationCtxt::normalize take cause by borrow 2022-11-28 17:35:40 +00:00
structured_errors.rs