diff options
| author | bors <bors@rust-lang.org> | 2021-03-29 19:44:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-29 19:44:27 +0000 |
| commit | 48691ea6e639640f110b43e33d4aba1f07e7415c (patch) | |
| tree | 38545970df174e8954a9eb83b04369dd1523275b /src | |
| parent | 2917eda69decdf813daa94b20dfb2edd3a555963 (diff) | |
| parent | 526bb10701af099f6812077a57bf64b53e85dd4c (diff) | |
| download | rust-48691ea6e639640f110b43e33d4aba1f07e7415c.tar.gz rust-48691ea6e639640f110b43e33d4aba1f07e7415c.zip | |
Auto merge of #83185 - jyn514:remove-dead-code, r=oli-obk
Remove (lots of) dead code Builds on - [ ] https://github.com/rust-lang/rust/pull/83161 - [x] https://github.com/rust-lang/rust/pull/83230 - [x] https://github.com/rust-lang/rust/pull/83197. Found with https://github.com/est31/warnalyzer. See https://github.com/rust-lang/rust/pull/77739 for a similar change in the past. Dubious changes: - Maybe some of the dead code in rustc_data_structures should be kept, in case someone wants to use it in the future? TODO: - [ ] check if any of the comments on the deleted code should be kept. - [x] update the compiler documentation; right now it fails to build - [x] finish moving `cfg(test)` changes into https://github.com/rust-lang/rust/pull/83197 cc `@est31`
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/functions.rs | 2 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/missing_doc.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_lints/src/functions.rs b/src/tools/clippy/clippy_lints/src/functions.rs index 730492fc7e3..5fe46065348 100644 --- a/src/tools/clippy/clippy_lints/src/functions.rs +++ b/src/tools/clippy/clippy_lints/src/functions.rs @@ -516,7 +516,7 @@ fn check_needless_must_use( ); }, ); - } else if !attr.is_value_str() && is_must_use_ty(cx, return_ty(cx, item_id)) { + } else if !attr.value_str().is_some() && is_must_use_ty(cx, return_ty(cx, item_id)) { span_lint_and_help( cx, DOUBLE_MUST_USE, diff --git a/src/tools/clippy/clippy_lints/src/missing_doc.rs b/src/tools/clippy/clippy_lints/src/missing_doc.rs index ff87828c2e7..5741aad261b 100644 --- a/src/tools/clippy/clippy_lints/src/missing_doc.rs +++ b/src/tools/clippy/clippy_lints/src/missing_doc.rs @@ -95,7 +95,7 @@ impl MissingDoc { let has_doc = attrs .iter() - .any(|a| a.is_doc_comment() || a.doc_str().is_some() || a.is_value_str() || Self::has_include(a.meta())); + .any(|a| a.is_doc_comment() || a.doc_str().is_some() || a.value_str().is_some() || Self::has_include(a.meta())); if !has_doc { span_lint( cx, |
