Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8df1366

Browse files
committedMar 31, 2025··
Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etc
1 parent 7bfd952 commit 8df1366

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+669
-92
lines changed
 

Diff for: ‎compiler/rustc_codegen_cranelift/example/example.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(no_core, unboxed_closures)]
22
#![no_core]
3-
#![allow(dead_code)]
3+
#![allow(dead_code, unnecessary_transmutes)]
44

55
extern crate mini_core;
66

Diff for: ‎compiler/rustc_codegen_gcc/example/example.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(no_core, unboxed_closures)]
22
#![no_core]
3-
#![allow(dead_code)]
3+
#![allow(dead_code, unnecessary_transmutes)]
44

55
extern crate mini_core;
66

@@ -11,11 +11,7 @@ fn abc(a: u8) -> u8 {
1111
}
1212

1313
fn bcd(b: bool, a: u8) -> u8 {
14-
if b {
15-
a * 2
16-
} else {
17-
a * 3
18-
}
14+
if b { a * 2 } else { a * 3 }
1915
}
2016

2117
fn call() {

0 commit comments

Comments
 (0)
Please sign in to comment.