Skip to content

Fix false positive for typoed crate or module suggestion #90125

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Oct 21, 2021

follow up of #89347

closes #89592
closes #76208

r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 21, 2021
@TaKO8Ki
Copy link
Member Author

TaKO8Ki commented Oct 21, 2021

I could fix this problem for modules but not for crates. I used resolve_ident_in_module, but it cannot solve this problem for crates. Could you give me some advice?

@rust-log-analyzer

This comment has been minimized.

@TaKO8Ki TaKO8Ki force-pushed the fix-typoed-crate-or-module-suggestion branch from ca60a5a to dd8bb96 Compare October 21, 2021 17:23
@rust-log-analyzer

This comment has been minimized.

@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 28, 2021
@bors
Copy link
Collaborator

bors commented Nov 5, 2021

☔ The latest upstream changes (presumably #90598) made this pull request unmergeable. Please resolve the merge conflicts.

@apiraino
Copy link
Contributor

apiraino commented Dec 2, 2021

@TaKO8Ki could you perhaps investigate the CI failing? thanks! :)

@rustbot label -S-waiting-on-review +S-waiting-on-author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 2, 2021
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

The changes look reasonable! Apologies for the delay in reviewing. There was a CI failure when I last looked at this PR that needed addressing, and a recent change introduced some merge conflicts. Could you try and rebase on top of master and make sure the tests all succeed?

fix false positive typoed crate or module suggestion
@TaKO8Ki TaKO8Ki force-pushed the fix-typoed-crate-or-module-suggestion branch from dd8bb96 to b5caa1e Compare December 3, 2021 00:47
@rust-log-analyzer

This comment has been minimized.

@TaKO8Ki
Copy link
Member Author

TaKO8Ki commented Dec 3, 2021

@estebank This PR solves a problem for modules but not for extern crates. I tried using resolve_ident_in_module for extern crates as well as modules, but it didn't go well. And I have no idea how to solve it. Could you give me some advice?

For example:
https://github.com/rust-lang/rust/pull/90125/files#r761906078

Comment on lines +7 to +10
help: there is a crate or module with a similar name
|
LL | use my_core::mem;
| ~~~~~~~
Copy link
Member Author

@TaKO8Ki TaKO8Ki Dec 3, 2021

Choose a reason for hiding this comment

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

For example, these lines should not be included in stderr because my_core is defined in a decl_macro a.

@TaKO8Ki TaKO8Ki requested a review from estebank December 3, 2021 12:50
@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 30, 2022
@bors
Copy link
Collaborator

bors commented Feb 18, 2022

☔ The latest upstream changes (presumably #94121) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member

@TaKO8Ki any updates on this?

@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 20, 2022
@Dylan-DPC
Copy link
Member

Closing this due to inactivity

@Dylan-DPC Dylan-DPC closed this Jun 17, 2022
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 17, 2022
@estebank
Copy link
Contributor

@TaKO8Ki feel free to reopen or refile when you have time again!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion for a typoed crate or module results in compile error Typo'd Imports Result in Confusing Error Message
9 participants