Skip to content

Commit

Permalink
Merge pull request rust-lang#227 from rust-lang/fix/warnings
Browse files Browse the repository at this point in the history
Fix warnings
  • Loading branch information
antoyo authored Oct 2, 2022
2 parents 6f1adbd + a28618d commit 86a3e3b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions example/alloc_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ extern "C" {

#[panic_handler]
fn panic_handler(_: &core::panic::PanicInfo) -> ! {
unsafe {
core::intrinsics::abort();
}
core::intrinsics::abort();
}

#[alloc_error_handler]
fn alloc_error_handler(_: alloc::alloc::Layout) -> ! {
unsafe {
core::intrinsics::abort();
}
core::intrinsics::abort();
}

#[start]
Expand Down
1 change: 1 addition & 0 deletions example/mini_core_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ fn main() {
} as Box<dyn SomeTrait>;

const FUNC_REF: Option<fn()> = Some(main);
#[allow(unreachable_code)]
match FUNC_REF {
Some(_) => {},
None => assert!(false),
Expand Down
6 changes: 2 additions & 4 deletions example/mod_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ extern {}

#[panic_handler]
fn panic_handler(_: &core::panic::PanicInfo) -> ! {
unsafe {
core::intrinsics::abort();
}
core::intrinsics::abort();
}

#[lang="eh_personality"]
Expand All @@ -32,6 +30,6 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[inline(never)]
fn black_box(i: u32) {
if i != 1 {
unsafe { core::intrinsics::abort(); }
core::intrinsics::abort();
}
}
1 change: 1 addition & 0 deletions example/std_example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(core_intrinsics, generators, generator_trait, is_sorted)]

#[cfg(feature="master")]
use std::arch::x86_64::*;
use std::io::Write;
use std::ops::Generator;
Expand Down

0 comments on commit 86a3e3b

Please sign in to comment.