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

Add a list of symbols for stable standard library crates #135247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jan 8, 2025

There are a few locations where the crate name is checked against an enumerated list of std, core, alloc, and proc_macro, or some subset thereof. In most cases when we are looking for any "standard library" crate, all four crates should be treated the same. Change this so the crates are listed in one place, and that list is used wherever a list of std crates is needed.

test could be considered relevant in some of these cases, but generally treating it separate from the others seems preferable while it is unstable.

There are also a few places that Clippy will be able to use this.

@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 closed this Jan 8, 2025
@tgross35 tgross35 reopened this Jan 8, 2025
@rust-log-analyzer

This comment has been minimized.

There are a few locations where the crate name is checked against an
enumerated list of `std`, `core`, `alloc`, and `proc_macro`, or some
subset thereof. In most of these cases, all four crates should likely be
treated the same. Change this so the crates are listed in one place, and
that list is used wherever a list of `std` crates is needed.

`test` could be considered relevant in some of these cases, but
generally treating it separate from the others seems preferable while it
is unstable.

There are also a few places that Clippy will be able to use this.
@petrochenkov
Copy link
Contributor

r? compiler

@oli-obk
Copy link
Contributor

oli-obk commented Jan 9, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Jan 9, 2025

📌 Commit 933c4f5 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2025
@oli-obk
Copy link
Contributor

oli-obk commented Jan 9, 2025

@bors rollup

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2025
Add a list of symbols for stable standard library crates

There are a few locations where the crate name is checked against an enumerated list of `std`, `core`, `alloc`, and `proc_macro`, or some subset thereof. In most cases when we are looking for any "standard library" crate, all four crates should be treated the same. Change this so the crates are listed in one place, and that list is used wherever a list of `std` crates is needed.

`test` could be considered relevant in some of these cases, but generally treating it separate from the others seems preferable while it is unstable.

There are also a few places that Clippy will be able to use this.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 9, 2025
Add a list of symbols for stable standard library crates

There are a few locations where the crate name is checked against an enumerated list of `std`, `core`, `alloc`, and `proc_macro`, or some subset thereof. In most cases when we are looking for any "standard library" crate, all four crates should be treated the same. Change this so the crates are listed in one place, and that list is used wherever a list of `std` crates is needed.

`test` could be considered relevant in some of these cases, but generally treating it separate from the others seems preferable while it is unstable.

There are also a few places that Clippy will be able to use this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants