Uplift `clippy::undropped_manually_drops` lint by Urgau · Pull Request #111530 ·...
source link: https://github.com/rust-lang/rust/pull/111530
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
This PR aims at uplifting the clippy::undropped_manually_drops
lint.
undropped_manually_drops
(warn-by-default)
The undropped_manually_drops
lint check for calls to std::mem::drop
with a value of std::mem::ManuallyDrop
which doesn't drop.
Example
struct S;
drop(std::mem::ManuallyDrop::new(S));
Explanation
ManuallyDrop
does not drop it's inner value so calling std::mem::drop
will not drop the inner value of the ManuallyDrop
either.
Mostly followed the instructions for uplifting an clippy lint described here: #99696 (review)
@rustbot label: +I-lang-nominated
r? compiler
For Clippy:
changelog: Moves: Uplifted clippy::undropped_manually_drops
into rustc
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
Collaborator
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
added the I-lang-nominated Indicates that an issue has been nominated for discussion during a lang team meeting. label
This comment has been minimized.
Collaborator
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Contributor
I think this part of the description is incorrect? Should it be " |
This comment was marked as outdated.
added T-lang Relevant to the language team, which will review and decide on the PR/issue.
and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Contributor
@rfcbot fcp merge |
Team member @tmandry has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it.
labels
Member
Didn't I see some lints go by recently that lint for using Or if this is worth adding separately, maybe it would make sense to give it a higher default level as a "this is a specific mistake that people make" deny lint rather than a "this is useless" warn lint? |
Contributor
Author
Yes, it was #109732
Well, it uplifted 4 lints,
Yes, sure. My take on the default level was "does it cause UB? yes -> deny; no -> warn" but since this lint catch's a so obvious mistake that no-one would have ever wrote this intentionally, it could make sense to make it deny-by-default. |
Member
Yeah, we have a couple of other deny-by-default lints like that. For example,
When there's a super-specific suggestion we can give (here to use |
added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised.
and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
labels
This is now entering its final comment period, as per the review above. |
Contributor
Author
Make sense, I will change it to deny-by-default. (btw, the suggestion here is |
Contributor
The latest upstream changes (presumably #111799) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
@rustbot label -I-lang-nominated |
removed the I-lang-nominated Indicates that an issue has been nominated for discussion during a lang team meeting. label
added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting
and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised.
labels
Contributor
Author
r? compiler |
added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Contributor
Author
unfortunately it won't work since you have used @rustbot ready |
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 (such as code changes or more information) from the author.
labels
@compiler-errors I think it was supposed to be done using @bors r=compiler-errors |
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
Member
Contributor
Test successful - checks-actions |
Collaborator
Finished benchmarking commit (d7ad9d9): comparison URL. Overall result: regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results CyclesResults Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 647.29s -> 649.935s (0.41%) |
Member
@rustbot label: +perf-regression-triaged |
added the perf-regression-triaged The performance regression has been triaged. label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK