Refactor PrimitiveTypeTable for Clippy#81680
Merged
bors merged 2 commits intorust-lang:masterfrom Feb 6, 2021
Merged
Conversation
Contributor
|
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
oli-obk
requested changes
Feb 3, 2021
Contributor
oli-obk
left a comment
There was a problem hiding this comment.
Great refactoring!
Could you also add some documentation on the new constant and function? Other than those nits, r=me
Contributor
Author
|
Good! I wasn't sure if the associated const was kosher. 😄 Changes made. |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit f66115d has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Feb 3, 2021
Refactor `PrimitiveTypeTable` for Clippy I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 6, 2021
…as-schievink Rollup of 7 pull requests Successful merges: - rust-lang#81402 (tidy: Run tidy style against markdown files.) - rust-lang#81434 (BTree: fix documentation of unstable public members) - rust-lang#81680 (Refactor `PrimitiveTypeTable` for Clippy) - rust-lang#81737 (typeck: Emit structured suggestions for tuple struct syntax) - rust-lang#81738 (Miscellaneous small diagnostics cleanup) - rust-lang#81766 (Enable 'task list' markdown extension) - rust-lang#81812 (Add a test for escaping LLVMisms in inline asm) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 11, 2021
Refactor `PrimitiveTypeTable` for Clippy I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
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 free
to 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.
I removed
PrimitiveTypeTableand addedPrimTy::ALLandPrimTy::from_namein its place. This allows Clippy to usePrimTy::from_namefor thebuiltin_type_shadowlint, and aconstlist of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.