Skip to content

Commit ca03f86

Browse files
committed
fix tidy
1 parent a774c81 commit ca03f86

File tree

3 files changed

+38
-4
lines changed

3 files changed

+38
-4
lines changed

src/libsyntax/feature_gate.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1107,10 +1107,12 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
11071107

11081108
// RFC 2070 (deprecated attribute name)
11091109
("panic_implementation",
1110-
Normal, Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/44489#issuecomment-415140224"),
1111-
"panic_implementation",
1112-
"This attribute was renamed to `panic_handler`",
1113-
cfg_fn!(panic_implementation))),
1110+
Normal,
1111+
Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/44489\
1112+
#issuecomment-415140224"),
1113+
"panic_implementation",
1114+
"This attribute was renamed to `panic_handler`",
1115+
cfg_fn!(panic_implementation))),
11141116

11151117
// RFC 2070
11161118
("panic_handler", Normal, Gated(Stability::Unstable,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// compile-flags:-C panic=abort
12+
13+
#![no_std]
14+
#![no_main]
15+
16+
use core::panic::PanicInfo;
17+
18+
#[panic_implementation] //~ ERROR This attribute was renamed to `panic_handler` (see issue #44489)
19+
fn panic(info: &PanicInfo) -> ! {
20+
loop {}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0658]: This attribute was renamed to `panic_handler` (see issue #44489)
2+
--> $DIR/feature-gate-panic-implementation.rs:18:1
3+
|
4+
LL | #[panic_implementation] //~ ERROR This attribute was renamed to `panic_handler` (see issue #44489)
5+
| ^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= help: add #![feature(panic_implementation)] to the crate attributes to enable
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)