This commit is contained in:
Jorge Aparicio 2018-08-23 13:52:43 +02:00
parent a774c81f98
commit ca03f86aad
3 changed files with 38 additions and 4 deletions

View file

@ -1107,10 +1107,12 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
// RFC 2070 (deprecated attribute name)
("panic_implementation",
Normal, Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/44489#issuecomment-415140224"),
"panic_implementation",
"This attribute was renamed to `panic_handler`",
cfg_fn!(panic_implementation))),
Normal,
Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/44489\
#issuecomment-415140224"),
"panic_implementation",
"This attribute was renamed to `panic_handler`",
cfg_fn!(panic_implementation))),
// RFC 2070
("panic_handler", Normal, Gated(Stability::Unstable,

View file

@ -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 {}
}

View file

@ -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`.