Uh oh!
There was an error while loading. Please reload this page.
Add a list of symbols for stable standard library crates - #135247
Merged
Conversation
rustbot
commented
Jan 8, 2025
Collaborator
rustbot has assigned @petrochenkov. Use |
rustbot
commented
Jan 8, 2025
Collaborator
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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
commented
Jan 8, 2025
Contributor
r? compiler |
oli-obk
approved these changes
Jan 9, 2025
oli-obk
commented
Jan 9, 2025
Contributor
@bors r+ |
bors
commented
Jan 9, 2025
Collaborator
oli-obk
commented
Jan 9, 2025
Contributor
@bors rollup |
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.
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 9, 2025
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#135212 (Remove outdated information in the `unreachable_pub` lint description) - rust-lang#135225 (Explicitly build proc macro test with panic=unwind) - rust-lang#135242 (add missing provenance APIs on NonNull) - rust-lang#135247 (Add a list of symbols for stable standard library crates) - rust-lang#135269 (Remove some unnecessary `.into()` calls) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 9, 2025
Rollup merge of rust-lang#135247 - tgross35:stdlib-sym-list, r=oli-obk 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are a few locations where the crate name is checked against an enumerated list of
std,core,alloc, andproc_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 ofstdcrates is needed.testcould 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.