rust-lang/rust-clippy

[lint idea] dangerous transmutes

Open

#546 aberto em 13 de jan. de 2016

Ver no GitHub
 (11 comments) (0 reactions) (0 assignees)Rust (1.391 forks)batch import
A-lintT-middlegood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 19d 22h) (113 fundiu PRs em 30d)

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.

Guia do colaborador