diff options
| author | bendn <bend.n@outlook.com> | 2025-03-31 15:50:56 +0700 |
|---|---|---|
| committer | bendn <bend.n@outlook.com> | 2025-04-24 13:14:36 +0700 |
| commit | c8c074288a277df21a52aded322dfa25bc283f64 (patch) | |
| tree | 272448f60986d3f18b5269162658319dcaf70bc8 /compiler/rustc_codegen_gcc/example/example.rs | |
| parent | c02a4f0852e6665cf3df3867982021383f5615df (diff) | |
| download | rust-c8c074288a277df21a52aded322dfa25bc283f64.tar.gz rust-c8c074288a277df21a52aded322dfa25bc283f64.zip | |
Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etc
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/example.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/example/example.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_gcc/example/example.rs b/compiler/rustc_codegen_gcc/example/example.rs index 03470b74d0a..888fa89201e 100644 --- a/compiler/rustc_codegen_gcc/example/example.rs +++ b/compiler/rustc_codegen_gcc/example/example.rs @@ -1,6 +1,6 @@ #![feature(no_core, unboxed_closures)] #![no_core] -#![allow(dead_code)] +#![allow(dead_code, unnecessary_transmutes)] extern crate mini_core; @@ -11,11 +11,7 @@ fn abc(a: u8) -> u8 { } fn bcd(b: bool, a: u8) -> u8 { - if b { - a * 2 - } else { - a * 3 - } + if b { a * 2 } else { a * 3 } } fn call() { |
