Skip to content

Add automatically applicable suggestion to should_assert_eq lint #1849

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

Closed
killercup opened this issue Jun 25, 2017 · 1 comment
Closed

Add automatically applicable suggestion to should_assert_eq lint #1849

killercup opened this issue Jun 25, 2017 · 1 comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages L-suggestion Lint: Improving, adding or fixing lint suggestions

Comments

@killercup
Copy link
Member

Found by running rustfix on https://github.com/space-wizards/bsdiff-rs. Hopefully not that hard assuming the lint already has a way to parse the expression as x == y.

warning: use `assert_eq` for better reporting
  --> tests/test.rs:25:5
   |
25 |     assert!(&expected == cursor.get_ref());
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(should_assert_eq)] on by default
   = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#should_assert_eq
   = note: this error originates in a macro outside of the current crate
@mcarton mcarton added L-suggestion Lint: Improving, adding or fixing lint suggestions C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels Jun 25, 2017
@killercup
Copy link
Member Author

No longer necessary, lint deprecated because of rust-lang/rfcs#2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages L-suggestion Lint: Improving, adding or fixing lint suggestions
Projects
None yet
Development

No branches or pull requests

2 participants