Skip to content

Commit

Permalink
Remove (lots of) dead code
Browse files Browse the repository at this point in the history
Found with https://github.com/est31/warnalyzer.

Dubious changes:
- Is anyone else using rustc_apfloat? I feel weird completely deleting
  x87 support.
- Maybe some of the dead code in rustc_data_structures, in case someone
  wants to use it in the future?
- Don't change rustc_serialize

  I plan to scrap most of the json module in the near future (see
  rust-lang/compiler-team#418) and fixing the
  tests needed more work than I expected.

TODO: check if any of the comments on the deleted code should be kept.
  • Loading branch information
jyn514 committed Mar 28, 2021
1 parent b094bb1 commit a57a8c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/missing_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a57a8c3

Please sign in to comment.