diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-06-04 19:57:12 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-06-04 19:57:12 +0200 |
| commit | 648b634e21a7d8541d84fc454700d5cb7fd7f3f4 (patch) | |
| tree | 394865cde66ec104496f1155f8597b898a6c7b9f /example | |
| parent | 1e70c51f60abc544d9a325c77474190f1719e560 (diff) | |
| download | rust-648b634e21a7d8541d84fc454700d5cb7fd7f3f4.tar.gz rust-648b634e21a7d8541d84fc454700d5cb7fd7f3f4.zip | |
Rustup to rustc 1.45.0-nightly (56daaf669 2020-06-03)
Diffstat (limited to 'example')
| -rw-r--r-- | example/mini_core.rs | 2 | ||||
| -rw-r--r-- | example/mini_core_hello_world.rs | 4 | ||||
| -rw-r--r-- | example/mod_bench.rs | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/example/mini_core.rs b/example/mini_core.rs index 8042ca89789..2732c6902b1 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -401,7 +401,7 @@ pub trait FnMut<Args>: FnOnce<Args> { #[lang = "panic"] #[track_caller] -pub fn panic(msg: &str) -> ! { +pub fn panic(_msg: &str) -> ! { unsafe { libc::puts("Panicking\n\0" as *const str as *const u8); intrinsics::abort(); diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 93eda4be31a..82014f594d2 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -414,10 +414,10 @@ pub enum E2<X> { fn check_niche_behavior () { if let E1::V2 { .. } = (E1::V1 { f: true }) { - unsafe { intrinsics::abort(); } + intrinsics::abort(); } if let E2::V1 { .. } = E2::V3::<Infallible> { - unsafe { intrinsics::abort(); } + intrinsics::abort(); } } diff --git a/example/mod_bench.rs b/example/mod_bench.rs index 2e2b0052dee..95bcad2cd17 100644 --- a/example/mod_bench.rs +++ b/example/mod_bench.rs @@ -6,9 +6,7 @@ extern {} #[panic_handler] fn panic_handler(_: &core::panic::PanicInfo) -> ! { - unsafe { - core::intrinsics::abort(); - } + core::intrinsics::abort(); } #[lang="eh_personality"] @@ -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(); } } |
