rust-lang/rust-clippy

[lint idea] dangerous transmutes

Open

#546 opened on 2016年1月13日

GitHub で見る
 (11 comments) (0 reactions) (0 assignees)Rust (1,391 forks)batch import
A-lintT-middlegood first issue

Repository metrics

Stars
 (10,406 stars)
PR merge metrics
 (平均マージ 19d 22h) (30d で 113 merged PRs)

説明

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.

コントリビューターガイド