about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-05-22 07:19:01 +0200
committerGitHub <noreply@github.com>2025-05-22 07:19:01 +0200
commitcc87ae85dd689abeba40efa1a7761300e14908f4 (patch)
treeaeab7976b0050f531da0c70f944bddae57ae1ab4 /compiler/rustc_codegen_llvm/src/errors.rs
parent5df0f729f5355cb3cd91f6bcff13566ae96dc220 (diff)
parentde8e8641ae8194009b13dcca997e1eaa991b2888 (diff)
downloadrust-cc87ae85dd689abeba40efa1a7761300e14908f4.tar.gz
rust-cc87ae85dd689abeba40efa1a7761300e14908f4.zip
Rollup merge of #140431 - bend-n:dont_handle_bool_transmute, r=Nadrieril
dont handle bool transmute

removes `transmute(u8) -> bool` suggestion due to ambiguity, leave it for clippy

elaboration on ambiguity in question:
`transmute::<u8, bool>(x)` will codegen to an `assume(u8 < 2)`;
`_ == 1` or `_ != 0` or `_ % 2 == 0` would remove that assumption
`match _ { x @ (0 | 1) => x == 1, _ => std::hint::unreachable_unchecked() }` is very verbose

`@rustbot` label L-unnecessary_transmutes
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions