Skip to content

Commit

Permalink
Ignore unnecessary_cast clippy false positive
Browse files Browse the repository at this point in the history
    warning: casting raw pointers to the same type and constness is unnecessary (`*const dyn of::NonStaticAny` -> `*const dyn of::NonStaticAny`)
       --> src/lib.rs:219:11
        |
    219 |         &*(&phantom_data as *const dyn NonStaticAny as *const (dyn NonStaticAny + 'static))
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&phantom_data as *const dyn NonStaticAny`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
        = note: `#[warn(clippy::unnecessary_cast)]` on by default
  • Loading branch information
dtolnay committed Aug 17, 2024
1 parent a716d18 commit 47a831c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@
#![no_std]
#![doc(html_root_url = "https://docs.rs/typeid/1.0.1")]
#![allow(clippy::doc_markdown, clippy::inline_always)]
#![allow(
clippy::doc_markdown,
clippy::inline_always,
clippy::unnecessary_cast, // https://github.com/rust-lang/rust-clippy/issues/12860
)]

extern crate self as typeid;

Expand Down

0 comments on commit 47a831c

Please sign in to comment.