-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Factor out several utils, add path_def_id
#8305
Conversation
r? @giraffate (rust-highfive has picked a reviewer for you, use r? to override) |
path_def_id
The only thing I would question here is how much utility Other than that I think this is good. It's an improvement over what currently exists and no matter what changes happen afterwards related to identifying items, paths will need to be resolved. Having all path resolution go through the same place will probably make future changes easier. |
Yeah Also is the distinction between |
|
☔ The latest upstream changes (presumably #8271) made this pull request unmergeable. Please resolve the merge conflicts. |
0b9cdb2
to
bd583d9
Compare
Rebased. I searched the code for |
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 looks like a great simplification of our utils!
Regarding the naming, I'm fine with how it is now. But I'll leave that decision up to you @Jarcho & @camsteffen.
r=me if you settled on the naming of the functions.
I think the name is fine as is. One small quip here is it doesn't actually take a |
@bors r=flip1995 |
📌 Commit bd583d9 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: none
This is generally an effort to reduce the total number of utils.
path_def_id
is added which I believe is more "cross-cutting" and also complementspath_to_local
. Best reviewed one commit at a time.Added:
path_def_id
path_res
Removed:
is_qpath_def_path
match_any_diagnostic_items
expr_path_res
single_segment_path
differing_macro_contexts
is_ty_param_lang_item
is_ty_param_diagnostic_item
get_qpath_generics
Renamed:
path_to_res
todef_path_res
get_qpath_generic_tys
toqpath_generic_tys
CC @Jarcho since this relates to some of your work and you may have input.