-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Simplify local_def_id
and as_local_hir_id
#71215
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
Simplify local_def_id
and as_local_hir_id
#71215
Conversation
local_def_id
and as_local_hir_id
r? @eddyb |
pub fn as_local_hir_id(&self, def_id: LocalDefId) -> hir::HirId { | ||
self.local_def_id_to_hir_id(def_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.
This is hilarious now. Not sure we should in this PR but at some point maybe we can change everything to def_id_to_hir_id
? def_id_to
is just 1 longer than as_local
but clearer IMO.
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 agree. Would local_def_id_to_hir_id
be even clearer?
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'm not sure tbh. It's a bit long but it might be worth it.
src/librustc_infer/infer/error_reporting/nice_region_error/find_anon_type.rs
Outdated
Show resolved
Hide resolved
src/librustc_infer/infer/error_reporting/nice_region_error/outlives_closure.rs
Outdated
Show resolved
Hide resolved
77734a9
to
2988d3d
Compare
2988d3d
to
da9c867
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit da9c867 with merge 4b8b1c55d91c00df6ad5b5b174c4dbfae7bab373... |
☀️ Try build successful - checks-azure |
Queued 4b8b1c55d91c00df6ad5b5b174c4dbfae7bab373 with parent 7f3df57, future comparison URL. |
Finished benchmarking try commit 4b8b1c55d91c00df6ad5b5b174c4dbfae7bab373, comparison URL. |
@bors r+ |
📌 Commit da9c867 has been approved by |
4bc4665
to
b9ba521
Compare
@ecstatic-morse @Dylan-DPC @eddyb rebased over master and fix the new librustdoc error |
@bors r=eddyb |
📌 Commit b9ba521 has been approved by |
⌛ Testing commit b9ba521 with merge 94317f50b93fe0774aa16e4f696ee62b7202f4bb... |
@bors retry (Yielding to rollup) |
☀️ Test successful - checks-azure |
Aaaaaaah finally! Thank you so much @ecstatic-morse @eddyb and @Dylan-DPC ! This change might break some tools because hir method |
See #70853