diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2018-08-23 13:52:43 +0200 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2018-08-23 20:58:55 +0200 |
| commit | ca03f86aadbcd79129fce8d29bf7dff68c778a81 (patch) | |
| tree | 2908e1f84fb4f1c71e334952262555b79ce2454f /src/test | |
| parent | a774c81f9855f75a1a86f71a851b373d2178d9e9 (diff) | |
| download | rust-ca03f86aadbcd79129fce8d29bf7dff68c778a81.tar.gz rust-ca03f86aadbcd79129fce8d29bf7dff68c778a81.zip | |
fix tidy
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-panic-implementation.rs | 21 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-panic-implementation.stderr | 11 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-panic-implementation.rs b/src/test/ui/feature-gates/feature-gate-panic-implementation.rs new file mode 100644 index 00000000000..84e5f302c16 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-panic-implementation.rs @@ -0,0 +1,21 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags:-C panic=abort + +#![no_std] +#![no_main] + +use core::panic::PanicInfo; + +#[panic_implementation] //~ ERROR This attribute was renamed to `panic_handler` (see issue #44489) +fn panic(info: &PanicInfo) -> ! { + loop {} +} diff --git a/src/test/ui/feature-gates/feature-gate-panic-implementation.stderr b/src/test/ui/feature-gates/feature-gate-panic-implementation.stderr new file mode 100644 index 00000000000..926a49ae831 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-panic-implementation.stderr @@ -0,0 +1,11 @@ +error[E0658]: This attribute was renamed to `panic_handler` (see issue #44489) + --> $DIR/feature-gate-panic-implementation.rs:18:1 + | +LL | #[panic_implementation] //~ ERROR This attribute was renamed to `panic_handler` (see issue #44489) + | ^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(panic_implementation)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. |
