rust-lang/rust-clippy

[lint idea] dangerous transmutes

Open

#546 创建于 2016年1月13日

在 GitHub 查看
 (11 评论) (0 反应) (0 负责人)Rust (1,391 fork)batch import
A-lintT-middlegood first issue

仓库指标

Star
 (10,406 star)
PR 合并指标
 (平均合并 19天 22小时) (30 天内合并 113 个 PR)

描述

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.

贡献者指南