Skip to content

Commit

Permalink
Ignore buggy ptr_arg clippy lint
Browse files Browse the repository at this point in the history
rust-lang/rust-clippy#8366

    error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
      --> src/read.rs:65:45
       |
    65 |     fn parse_str<'s>(&'s mut self, scratch: &'s mut Vec<u8>) -> Result<Reference<'de, 's, str>>;
       |                                             ^^^^^^^^^^^^^^^ help: change this to: `&'s mut [u8]`
       |
       = note: `-D clippy::ptr-arg` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg

    error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
      --> src/read.rs:76:18
       |
    76 |         scratch: &'s mut Vec<u8>,
       |                  ^^^^^^^^^^^^^^^ help: change this to: `&'s mut [u8]`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
  • Loading branch information
dtolnay committed Jan 29, 2022
1 parent aa78d6c commit 977975e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@
clippy::match_single_binding,
clippy::needless_doctest_main,
clippy::needless_late_init,
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/8366
clippy::ptr_arg,
clippy::return_self_not_must_use,
clippy::transmute_ptr_to_ptr,
clippy::unnecessary_wraps,
Expand Down

0 comments on commit 977975e

Please sign in to comment.