-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New lint - same_length_and_capacity
#15656
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
Open
km274
wants to merge
2
commits into
rust-lang:master
Choose a base branch
from
km274:from_raw_parts_same_len_and_cap
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Lintcheck changes for d6a455e
This comment will be updated if you push new changes |
Oops, I understand why CI failed. I'll take care of that. |
10aca0a
to
2a4a572
Compare
This comment has been minimized.
This comment has been minimized.
@rustbot ready |
de87dd6
to
b3cbb63
Compare
This comment has been minimized.
This comment has been minimized.
… expression is used for the length and the capacity
b3cbb63
to
d6a455e
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lint
Area: New lints
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties
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.
Fixes #5955
I understand that there's a feature freeze right now. I had started working on this before I was aware of the feature freeze. I don't mind waiting as long as I need to for feedback.
changelog: [
same_length_and_capacity
]: adds a new lint that checks for usages offrom_raw_parts
where the same expression is passed for the length and the capacitySummary Notes
Managed by
@rustbot
—see help for details