-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The (almost) culmination of HirIdification #62168
The (almost) culmination of HirIdification #62168
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @Zoxc |
I think there a few more things to do:
|
I could add the name cleanups to this PR; I'll look into map generation when I have a bit more time. |
9e2e0ca
to
6c473c9
Compare
@Zoxc comment addressed; since a fair number of files were altered, I'd leave the adjustment to the |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
6c473c9
to
0e1e1c2
Compare
I actually already had the |
src/librustc/infer/error_reporting/nice_region_error/find_anon_type.rs
Outdated
Show resolved
Hide resolved
@Zoxc: can we merge this one? It might take me a while to fully kill off |
#[inline] | ||
pub fn opt_local_def_id_from_hir_id(&self, hir_id: HirId) -> Option<DefId> { | ||
pub fn opt_local_def_id(&self, hir_id: HirId) -> Option<DefId> { | ||
let node_id = self.hir_to_node_id(hir_id); | ||
self.definitions.opt_local_def_id(node_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this stil uses node ids too. Should add it to the todo list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already did 👍.
src/librustc/infer/error_reporting/nice_region_error/find_anon_type.rs
Outdated
Show resolved
Hide resolved
@@ -1500,7 +1500,7 @@ pub fn check_crate<'tcx, T: for<'a> LateLintPass<'a, 'tcx>>( | |||
time(tcx.sess, "module lints", || { | |||
// Run per-module lints | |||
par_iter(&tcx.hir().krate().modules).for_each(|(&module, _)| { | |||
tcx.ensure().lint_mod(tcx.hir().local_def_id(module)); | |||
tcx.ensure().lint_mod(tcx.hir().local_def_id_from_node_id(module)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Crate.modules
field should use a HirId
. Add that to the todo list too
@bors r+ |
@bors r+ |
📌 Commit ba54e768db1b09982f5543f2bb37c4a80ad0d149 has been approved by |
@Zoxc: any hints on how I can get from |
@ljedrz You probably need some map in |
☔ The latest upstream changes (presumably #62355) made this pull request unmergeable. Please resolve the merge conflicts. |
dbcb919
to
a6030ff
Compare
@bors r=Zoxc |
📌 Commit a6030ff has been approved by |
…ation, r=Zoxc The (almost) culmination of HirIdification It's finally over. This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name. All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
…ation, r=Zoxc The (almost) culmination of HirIdification It's finally over. This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name. All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
…ation, r=Zoxc The (almost) culmination of HirIdification It's finally over. This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name. All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
Rollup of 13 pull requests Successful merges: - #61545 (Implement another internal lints) - #62110 (Improve -Ztime-passes) - #62133 (Feature gate `rustc` attributes harder) - #62158 (Add MemoryExtra in InterpretCx constructor params) - #62168 (The (almost) culmination of HirIdification) - #62193 (Create async version of the dynamic-drop test) - #62369 (Remove `compile-pass` from compiletest) - #62380 (rustc_target: avoid negative register counts in the SysV x86_64 ABI.) - #62381 (Fix a typo in Write::write_vectored docs) - #62390 (Update README.md) - #62396 (remove Scalar::is_null_ptr) - #62406 (Lint on invalid values passed to x.py --warnings) - #62414 (Remove last use of mem::uninitialized in SGX) Failed merges: r? @ghost
Rustup HirIdification Rustup rust-lang/rust#62168 changelog: none
It's finally over.
This PR removes old
FIXME
s and renames some functions so that theHirId
variant has the shorter name.All that remains (and rightfully so) is stuff in
resolve
,save_analysis
and (as far as I can tell) in a few places where we can't replaceNodeId
withHirId
.