Skip to content

Commit

Permalink
Ignore assertions_on_result_states clippy lint
Browse files Browse the repository at this point in the history
    error: called `assert!` with `Result::is_err`
      --> tests/test_stmt.rs:48:5
       |
    48 |     assert!(syn::parse_str::<Stmt>("let _ = &raw x;").is_err());
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `syn::parse_str::<Stmt>("let _ = &raw x;").unwrap_err()`
       |
       = note: `-D clippy::assertions-on-result-states` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states

    error: called `assert!` with `Result::is_err`
       --> tests/test_derive_input.rs:396:5
        |
    396 |     assert!(input.attrs[0].parse_meta().is_err());
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `input.attrs[0].parse_meta().unwrap_err()`
        |
        = note: `-D clippy::assertions-on-result-states` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states

    error: called `assert!` with `Result::is_err`
       --> tests/test_derive_input.rs:432:5
        |
    432 |     assert!(input.attrs[0].parse_meta().is_err());
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `input.attrs[0].parse_meta().unwrap_err()`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
  • Loading branch information
dtolnay committed Jul 30, 2022
1 parent 470025c commit f1089e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_derive_input.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::too_many_lines)]
#![allow(clippy::assertions_on_result_states, clippy::too_many_lines)]

#[macro_use]
mod macros;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_stmt.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::non_ascii_literal)]
#![allow(clippy::assertions_on_result_states, clippy::non_ascii_literal)]

#[macro_use]
mod macros;
Expand Down

0 comments on commit f1089e3

Please sign in to comment.