rust-lang/rust-clippy

[lint idea] dangerous transmutes

Open

#546 建立於 2016年1月13日

在 GitHub 查看
 (11 留言) (0 反應) (0 負責人)Rust (10,406 star) (1,391 fork)batch import
A-lintT-middlegood first issue

描述

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.

貢獻者指南

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