diff options
author | Michael Goulet <michael@errs.io> | 2023-01-04 20:36:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 20:36:28 -0800 |
commit | 5ce6311f340c2be82fbfe304aa6a56f2fade9230 (patch) | |
tree | 99dd0f9f20a84c1d3709434f5a15b5a555d487c2 /tests/rustdoc-js-std/parser-errors.js | |
parent | 13bb8a8b15094d9d113f9d1c10c778b6b14882c5 (diff) | |
parent | b1b19bd8519ec2645578ecfcc55a438324ee5908 (diff) | |
download | rust-5ce6311f340c2be82fbfe304aa6a56f2fade9230.tar.gz |
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.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions