Skip to content

Fix std-instead-of-core FP when not all items come from the new crate #15165

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

Merged
merged 1 commit into from
Jul 1, 2025

Conversation

profetia
Copy link
Contributor

@profetia profetia commented Jun 28, 2025

Closes #15143

Covering edge cases missed in #15016

changelog: [std-instead-of-core] fix FP when not all items come from the new crate

@rustbot
Copy link
Collaborator

rustbot commented Jun 28, 2025

r? @Alexendoo

rustbot has assigned @Alexendoo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 28, 2025
@samueltardieu
Copy link
Contributor

r? samueltardieu

@rustbot rustbot assigned samueltardieu and unassigned Alexendoo Jun 29, 2025
Copy link
Contributor

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

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

The lint must still trigger in the newly added case, but only for the items which should come from core (such as core::error::Error), leaving the others (here std::fs::File) untouched.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 29, 2025
@profetia
Copy link
Contributor Author

Now this lint will trigger when only part of the use tree can be imported from core, and will not give fix for this case.

@profetia
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jun 30, 2025
@profetia
Copy link
Contributor Author

Btw, why is the lint source file named std_instead_of_core, when it actually contains std_instead_of_core, std_instead_of_alloc, and alloc_instead_of_core

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 30, 2025
@profetia
Copy link
Contributor Author

profetia commented Jul 1, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 1, 2025
@samueltardieu samueltardieu added this pull request to the merge queue Jul 1, 2025
@samueltardieu
Copy link
Contributor

Thanks!

Merged via the queue into rust-lang:master with commit ad15b60 Jul 1, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std-instead-of-core: crate change is suggested even though not all items come from the new crate
4 participants