rust-lang/rust-clippy

[lint idea] dangerous transmutes

Open

#546 opened on Jan 13, 2016

View on GitHub
 (11 comments) (0 reactions) (0 assignees)Rust (10,406 stars) (1,391 forks)batch import
A-lintT-middlegood first issue

Description

Along the lines of useless_transmute, it seems plausible to warn on transmute::<X, Y>(x) where X and Y aren't both primitive types or marked #[repr(C)], since as @ubsan keeps reminding us this is likely to cause UB.

Contributor guide

[lint idea] dangerous transmutes · rust-lang/rust-clippy#546 | Good First Issue