Skip to content

Commit

Permalink
Ignore cast_possible_wrap pedantic clippy lint
Browse files Browse the repository at this point in the history
    error: casting `usize` to `isize` may wrap around the value
      --> src/buffer.rs:56:46
       |
    56 |                     entries.push(Entry::End(-(group_end_index as isize)));
       |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
       = note: `-D clippy::cast-possible-wrap` implied by `-D clippy::pedantic`

    error: casting `usize` to `isize` may wrap around the value
      --> src/buffer.rs:82:34
       |
    82 |         entries.push(Entry::End(-(entries.len() as isize)));
       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
  • Loading branch information
dtolnay committed Oct 20, 2022
1 parent f6f7d8a commit 8db5adb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Expand Up @@ -257,6 +257,7 @@
clippy::bool_to_int_with_if,
clippy::cast_lossless,
clippy::cast_possible_truncation,
clippy::cast_possible_wrap,
clippy::cast_ptr_alignment,
clippy::default_trait_access,
clippy::doc_markdown,
Expand Down

0 comments on commit 8db5adb

Please sign in to comment.