Skip to content

Commit a28618d

Browse files
committed
Fix warnings
1 parent 6f1adbd commit a28618d

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

example/alloc_example.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ extern "C" {
1818

1919
#[panic_handler]
2020
fn panic_handler(_: &core::panic::PanicInfo) -> ! {
21-
unsafe {
22-
core::intrinsics::abort();
23-
}
21+
core::intrinsics::abort();
2422
}
2523

2624
#[alloc_error_handler]
2725
fn alloc_error_handler(_: alloc::alloc::Layout) -> ! {
28-
unsafe {
29-
core::intrinsics::abort();
30-
}
26+
core::intrinsics::abort();
3127
}
3228

3329
#[start]

example/mini_core_hello_world.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ fn main() {
228228
} as Box<dyn SomeTrait>;
229229

230230
const FUNC_REF: Option<fn()> = Some(main);
231+
#[allow(unreachable_code)]
231232
match FUNC_REF {
232233
Some(_) => {},
233234
None => assert!(false),

example/mod_bench.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ extern {}
66

77
#[panic_handler]
88
fn panic_handler(_: &core::panic::PanicInfo) -> ! {
9-
unsafe {
10-
core::intrinsics::abort();
11-
}
9+
core::intrinsics::abort();
1210
}
1311

1412
#[lang="eh_personality"]
@@ -32,6 +30,6 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize {
3230
#[inline(never)]
3331
fn black_box(i: u32) {
3432
if i != 1 {
35-
unsafe { core::intrinsics::abort(); }
33+
core::intrinsics::abort();
3634
}
3735
}

example/std_example.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(core_intrinsics, generators, generator_trait, is_sorted)]
22

3+
#[cfg(feature="master")]
34
use std::arch::x86_64::*;
45
use std::io::Write;
56
use std::ops::Generator;

0 commit comments

Comments
 (0)