Skip to content
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

Return multiple resolutions from def_path_res #9800

Merged
merged 1 commit into from
Nov 19, 2022

Conversation

Alexendoo
Copy link
Member

Changes def_path_res to return all the resolutions matching the path rather than the first one (with a namespace hint that covered some cases). This would fix any issues that come up with multiple versions of the same crate being present as they all have the same crate name

It also adds resolution of impl _ {} items for local items, and removes struct field resolution as it didn't seem to be used anywhere

I tested it on a local crate and it worked for the multiple crate issue, but I couldn't come up with a test that worked well with // aux-build, maybe // aux-crate after rust-lang/rust#103266 could work but I'm not sure on that either

changelog: [disallowed_methods], [disallowed_types], [disallowed_macros]: fix path resolution with multiple versions of the same crate
changelog: [disallowed_methods]: Resolve methods in impls in the current crate

@rust-highfive
Copy link

r? @dswij

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 4, 2022
@Alexendoo Alexendoo force-pushed the def_path_res_multiple branch from 3a25169 to 1e1ac2b Compare November 4, 2022 21:58
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this!

@dswij
Copy link
Member

dswij commented Nov 19, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Nov 19, 2022

📌 Commit 1e1ac2b has been approved by dswij

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 19, 2022

⌛ Testing commit 1e1ac2b with merge f60186f...

@bors
Copy link
Contributor

bors commented Nov 19, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: dswij
Pushing f60186f to master...

@bors bors merged commit f60186f into rust-lang:master Nov 19, 2022
@Alexendoo Alexendoo deleted the def_path_res_multiple branch November 19, 2022 12:31
@Alexendoo
Copy link
Member Author

Huh I thought this was already merged 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants