Skip to content

Uplift drop-bounds lint from clippy - #75699

Merged
bors merged 2 commits into
rust-lang:masterfrom
notriddle:drop-bounds-lint
Oct 4, 2020
Merged

Uplift drop-bounds lint from clippy#75699
bors merged 2 commits into
rust-lang:masterfrom
notriddle:drop-bounds-lint

Conversation

@notriddle

Copy link
Copy Markdown
Contributor

Bounds on T: Drop do nothing, so they should warn.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2020
@jonas-schievinkjonas-schievink added the T-lang Relevant to the language team label Aug 19, 2020
Comment threadsrc/librustc_lint/traits.rs Outdated
Comment threadlibrary/core/src/ops/drop.rs Outdated
Comment threadsrc/test/ui/drop-bounds/drop-bounds.rs Outdated
Comment threadsrc/librustc_lint/traits.rs Outdated
@petrochenkov

Copy link
Copy Markdown
Contributor

This looks reasonable to me.
Could you open an MCP for this? (Example: rust-lang/compiler-team#346)

@petrochenkovpetrochenkov 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 Aug 19, 2020
Comment threadsrc/test/ui/drop-bounds/drop-bounds.rs Outdated
@notriddle

Copy link
Copy Markdown
ContributorAuthor

rust-lang/compiler-team#347 Is the MCP

Comment threadsrc/librustc_lint/traits.rs Outdated
@bors

This comment has been minimized.

@notriddle

Copy link
Copy Markdown
ContributorAuthor

@rustbot modify labels: +S-waiting-on-review and -S-waiting-on-author

@rustbotrustbot 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 Sep 11, 2020
@petrochenkov

petrochenkov commented Sep 11, 2020

Copy link
Copy Markdown
Contributor

r=me on the implementation after squashing commits.
Looks like this is still waiting on team though (rust-lang/compiler-team#347).

@petrochenkovpetrochenkov added S-waiting-on-team T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-lang Relevant to the language team labels Sep 11, 2020
@flip1995

flip1995 commented Sep 30, 2020

Copy link
Copy Markdown
Member

Should we directly deprecate the lint from Clippy in this PR or do it in Clippy after this PR is merged and sync it back to rustc?

I can guide through the process of deprecating Clippy lints.

@spastorino

Copy link
Copy Markdown
Member

This is no longer waiting on team, MCP has been accepted.

@spastorinospastorino 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-team labels Sep 30, 2020
@bors

bors commented Oct 1, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit cd159fd has been approved by petrochenkov

@borsbors 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 Oct 1, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 1, 2020
…chenkov
Uplift drop-bounds lint from clippy
Bounds on `T: Drop` do nothing, so they should warn.
@bors

bors commented Oct 2, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit cd159fd with merge 866ac1183a3d7ac82f37bd74092d140977ac13ab...

@bors

bors commented Oct 2, 2020

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 2, 2020
@petrochenkov

Copy link
Copy Markdown
Contributor

Some clippy tests need to be updated.

@petrochenkovpetrochenkov 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 Oct 2, 2020
@flip1995

Copy link
Copy Markdown
Member

Either we update the Clippy tests here, then sync these changes to Clippy, then deprecate the lint in Clippy, and then sync it back to rustc

or

We deprecate the lint here, don't have to go through the whole sync process twice and make Clippy test-pass at the same time.


Instructions how to deprecate a Clippy lint:

  1. Remove this file:
    usecrate::utils::{match_def_path, paths, span_lint};
  2. Add this lint to this file
    macro_rules! declare_deprecated_lint {
  3. Remove the test file
  4. a. temporarily add src/tools/clippy/clippy_dev to workspace.members in the Cargo.toml
    b. cd into src/tools/clippy and run cargo dev update_lints
  5. Clean up Clippy until ./x.py check src/tools/clippy passes
  6. Add a deprecation test and update the deprecated.stderr reference file.

Or just apply this patch: https://gist.github.com/flip1995/bbde96b04ca768f4ed7713dd53f23641

@flip1995flip1995 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK Clippy change 👍

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 3, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit dceb81a has been approved by petrochenkov

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 3, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 3, 2020
…chenkov
Uplift drop-bounds lint from clippy
Bounds on `T: Drop` do nothing, so they should warn.
@JohnTitorJohnTitor mentioned this pull request Oct 4, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 4, 2020
Rollup of 11 pull requests
Successful merges:
- rust-lang#75143 (Use `tracing` spans to trace the entire MIR interp stack)
- rust-lang#75699 (Uplift drop-bounds lint from clippy)
- rust-lang#76768 (Test and reject out-of-bounds shuffle vectors)
- rust-lang#77190 (updated p! macro to accept literals)
- rust-lang#77388 (Add some regression tests)
- rust-lang#77419 (Create E0777 error code for invalid argument in derive)
- rust-lang#77447 (BTreeMap: document DrainFilterInner better)
- rust-lang#77468 (Fix test name)
- rust-lang#77469 (Improve rustdoc error for failed intra-doc link resolution)
- rust-lang#77473 (Make --all-targets in x.py check opt-in)
- rust-lang#77508 (Fix capitalization in blog post name)
Failed merges:
r? `@ghost`
@bors
bors merged commit b654555 into rust-lang:masterOct 4, 2020
@rustbotrustbot added this to the 1.49.0 milestone Oct 4, 2020
@notriddle
notriddle deleted the drop-bounds-lint branch October 4, 2020 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

10 participants

@notriddle@rust-highfive@petrochenkov@bors@flip1995@spastorino@Aaron1011@tesuji@jonas-schievink@rustbot