Skip to content
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

Dead-code pass highlights too much of impl functions #71947

Merged
merged 1 commit into from
May 9, 2020

Conversation

mibac138
Copy link
Contributor

@mibac138 mibac138 commented May 6, 2020

Fixes #66627.
Previous diagnostic:

error: method is never used: `unused_impl_fn_3`
  --> src/main.rs:28:5
   |
28 | /     fn unused_impl_fn_3(
29 | |         var: i32,
30 | |     ) {
31 | |         println!("bar {}", var);
32 | |     }
   | |_____^

New diagnostic:

error: associated function is never used: `unused_impl_fn_3`
  --> $DIR/lint-dead-code-6.rs:13:8
   |
LL |     fn unused_impl_fn_3(
   |        ^^^^^^^^^^^^^^^^

This makes associated functions in line with free-standing functions.

@rust-highfive
Copy link
Collaborator

r? @cramertj

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 6, 2020
@cramertj
Copy link
Member

cramertj commented May 8, 2020

@bors r+

@bors
Copy link
Contributor

bors commented May 8, 2020

📌 Commit b6d5d1f has been approved by cramertj

@bors bors 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 May 8, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#70834 (Add core::future::{pending,ready})
 - rust-lang#71839 (Make BTreeMap::new and BTreeSet::new const)
 - rust-lang#71890 (Simplify the error Registry methods a little)
 - rust-lang#71942 (Shrink `LocalDecl`)
 - rust-lang#71947 (Dead-code pass highlights too much of impl functions)
 - rust-lang#71981 (Fix `strip-priv-imports` pass name in the rustdoc documentation)
 - rust-lang#72018 (Fix canonicalization links)
 - rust-lang#72031 (Better documentation for io::Read::read() return value)

Failed merges:

r? @ghost
@bors bors merged commit 966589e into rust-lang:master May 9, 2020
@mibac138 mibac138 deleted the dead-code branch May 10, 2020 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dead_code lint highlights more than the ident for impl function
4 participants