Skip to content

Commit 6091696

Browse files
committed
Rollup merge of rust-lang#55601 - petrochenkov:featissue, r=pnkfelix
Fix tracking issue numbers for some unstable features And also remove deprecated unstable `#[panic_implementation]` attribute that was superseded by stable `#[panic_handler]` and doesn't have an open tracking issue.
2 parents 462f63e + 29d2cea commit 6091696

14 files changed

+26
-113
lines changed

src/librustc/middle/dead.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,8 @@ fn has_allow_dead_code_or_lang_attr(tcx: TyCtxt<'_, '_, '_>,
291291
return true;
292292
}
293293

294-
// (To be) stable attribute for #[lang = "panic_impl"]
295-
if attr::contains_name(attrs, "panic_implementation") ||
296-
attr::contains_name(attrs, "panic_handler")
297-
{
294+
// Stable attribute for #[lang = "panic_impl"]
295+
if attr::contains_name(attrs, "panic_handler") {
298296
return true;
299297
}
300298

src/librustc/middle/lang_items.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ pub fn extract(attrs: &[ast::Attribute]) -> Option<(Symbol, Span)> {
204204
if let Some(value) = attribute.value_str() {
205205
return Some((value, attribute.span));
206206
}
207-
} else if attribute.check_name("panic_implementation") ||
208-
attribute.check_name("panic_handler")
209-
{
207+
} else if attribute.check_name("panic_handler") {
210208
return Some((Symbol::intern("panic_impl"), attribute.span))
211209
} else if attribute.check_name("alloc_error_handler") {
212210
return Some((Symbol::intern("oom"), attribute.span))

src/librustc_mir/monomorphize/partitioning.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ fn mono_item_visibility(
511511
//
512512
// * First is weak lang items. These are basically mechanisms for
513513
// libcore to forward-reference symbols defined later in crates like
514-
// the standard library or `#[panic_implementation]` definitions. The
514+
// the standard library or `#[panic_handler]` definitions. The
515515
// definition of these weak lang items needs to be referenceable by
516516
// libcore, so we're no longer a candidate for internalization.
517517
// Removal of these functions can't be done by LLVM but rather must be

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>,
11671167
}
11681168
}
11691169

1170-
// Check that a function marked as `#[panic_implementation]` has signature `fn(&PanicInfo) -> !`
1170+
// Check that a function marked as `#[panic_handler]` has signature `fn(&PanicInfo) -> !`
11711171
if let Some(panic_impl_did) = fcx.tcx.lang_items().panic_impl() {
11721172
if panic_impl_did == fcx.tcx.hir.local_def_id(fn_id) {
11731173
if let Some(panic_info_did) = fcx.tcx.lang_items().panic_info() {

src/libsyntax/feature_gate.rs

+8-19
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ declare_features! (
349349
(active, abi_thiscall, "1.19.0", None, None),
350350

351351
// Allows a test to fail without failing the whole suite
352-
(active, allow_fail, "1.19.0", Some(42219), None),
352+
(active, allow_fail, "1.19.0", Some(46488), None),
353353

354354
// Allows unsized tuple coercion.
355355
(active, unsized_tuple_coercion, "1.20.0", Some(42877), None),
@@ -376,7 +376,7 @@ declare_features! (
376376
(active, non_exhaustive, "1.22.0", Some(44109), None),
377377

378378
// `crate` as visibility modifier, synonymous to `pub(crate)`
379-
(active, crate_visibility_modifier, "1.23.0", Some(45388), None),
379+
(active, crate_visibility_modifier, "1.23.0", Some(53120), None),
380380

381381
// extern types
382382
(active, extern_types, "1.23.0", Some(43467), None),
@@ -391,13 +391,13 @@ declare_features! (
391391
(active, generic_associated_types, "1.23.0", Some(44265), None),
392392

393393
// `extern` in paths
394-
(active, extern_in_paths, "1.23.0", Some(44660), None),
394+
(active, extern_in_paths, "1.23.0", Some(55600), None),
395395

396396
// Use `?` as the Kleene "at most one" operator
397397
(active, macro_at_most_once_rep, "1.25.0", Some(48075), None),
398398

399399
// Infer static outlives requirements; RFC 2093
400-
(active, infer_static_outlives_requirements, "1.26.0", Some(44493), None),
400+
(active, infer_static_outlives_requirements, "1.26.0", Some(54185), None),
401401

402402
// Multiple patterns with `|` in `if let` and `while let`
403403
(active, if_while_or_patterns, "1.26.0", Some(48215), None),
@@ -448,9 +448,6 @@ declare_features! (
448448
// Integer match exhaustiveness checking
449449
(active, exhaustive_integer_patterns, "1.30.0", Some(50907), None),
450450

451-
// RFC 2070: #[panic_implementation] / #[panic_handler]
452-
(active, panic_implementation, "1.28.0", Some(44489), None),
453-
454451
// #[doc(keyword = "...")]
455452
(active, doc_keyword, "1.28.0", Some(51315), None),
456453

@@ -466,7 +463,7 @@ declare_features! (
466463
(active, test_2018_feature, "1.31.0", Some(0), Some(Edition::Edition2018)),
467464

468465
// Support for arbitrary delimited token streams in non-macro attributes
469-
(active, unrestricted_attribute_tokens, "1.30.0", Some(44690), None),
466+
(active, unrestricted_attribute_tokens, "1.30.0", Some(55208), None),
470467

471468
// Allows `use x::y;` to resolve through `self::x`, not just `::x`
472469
(active, uniform_paths, "1.30.0", Some(53130), None),
@@ -503,7 +500,7 @@ declare_features! (
503500
(active, underscore_const_names, "1.31.0", Some(54912), None),
504501

505502
// `extern crate foo as bar;` puts `bar` into extern prelude.
506-
(active, extern_crate_item_prelude, "1.31.0", Some(54658), None),
503+
(active, extern_crate_item_prelude, "1.31.0", Some(55599), None),
507504

508505
// `reason = ` in lint attributes and `expect` lint attribute
509506
(active, lint_reasons, "1.31.0", Some(54503), None),
@@ -541,6 +538,8 @@ declare_features! (
541538
Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
542539
(removed, proc_macro_gen, "1.27.0", Some(54727), None,
543540
Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
541+
(removed, panic_implementation, "1.28.0", Some(44489), None,
542+
Some("subsumed by `#[panic_handler]`")),
544543
);
545544

546545
declare_features! (
@@ -1160,16 +1159,6 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
11601159
"infer 'static lifetime requirements",
11611160
cfg_fn!(infer_static_outlives_requirements))),
11621161

1163-
// RFC 2070 (deprecated attribute name)
1164-
("panic_implementation",
1165-
Normal,
1166-
Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/44489\
1167-
#issuecomment-415140224",
1168-
Some("replace this attribute with `#[panic_handler]`")),
1169-
"panic_implementation",
1170-
"this attribute was renamed to `panic_handler`",
1171-
cfg_fn!(panic_implementation))),
1172-
11731162
// RFC 2070
11741163
("panic_handler", Normal, Ungated),
11751164

src/test/run-make/wasm-symbols-not-imported/foo.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#![crate_type = "cdylib"]
12-
13-
#![feature(panic_implementation)]
1412
#![no_std]
1513

1614
use core::panic::PanicInfo;
@@ -20,7 +18,7 @@ pub extern fn foo() {
2018
panic!()
2119
}
2220

23-
#[panic_implementation]
21+
#[panic_handler]
2422
fn panic(_info: &PanicInfo) -> ! {
2523
loop {}
2624
}

src/test/ui/feature-gates/feature-gate-allow_fail.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: allow_fail attribute is currently unstable (see issue #42219)
1+
error[E0658]: allow_fail attribute is currently unstable (see issue #46488)
22
--> $DIR/feature-gate-allow_fail.rs:13:1
33
|
44
LL | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable

src/test/ui/feature-gates/feature-gate-crate_visibility_modifier.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: `crate` visibility modifier is experimental (see issue #45388)
1+
error[E0658]: `crate` visibility modifier is experimental (see issue #53120)
22
--> $DIR/feature-gate-crate_visibility_modifier.rs:11:1
33
|
44
LL | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental

src/test/ui/feature-gates/feature-gate-extern_crate_item_prelude.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
1+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
22
--> $DIR/feature-gate-extern_crate_item_prelude.rs:26:9
33
|
44
LL | use alloc;
55
| ^^^^^
66
|
77
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
88

9-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
9+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
1010
--> $DIR/feature-gate-extern_crate_item_prelude.rs:28:9
1111
|
1212
LL | use alloc::boxed;
1313
| ^^^^^
1414
|
1515
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
1616

17-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
17+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
1818
--> $DIR/feature-gate-extern_crate_item_prelude.rs:33:11
1919
|
2020
LL | use ::alloc;
2121
| ^^^^^
2222
|
2323
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
2424

25-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
25+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
2626
--> $DIR/feature-gate-extern_crate_item_prelude.rs:35:11
2727
|
2828
LL | use ::alloc::boxed;
2929
| ^^^^^
3030
|
3131
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
3232

33-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
33+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
3434
--> $DIR/feature-gate-extern_crate_item_prelude.rs:9:17
3535
|
3636
LL | let v = alloc::vec![0];
3737
| ^^^^^
3838
|
3939
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
4040

41-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
41+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
4242
--> $DIR/feature-gate-extern_crate_item_prelude.rs:11:18
4343
|
4444
LL | type A = alloc::boxed::Box<u8>;
4545
| ^^^^^
4646
|
4747
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
4848

49-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
49+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
5050
--> $DIR/feature-gate-extern_crate_item_prelude.rs:18:19
5151
|
5252
LL | let v = ::alloc::vec![0];
5353
| ^^^^^
5454
|
5555
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
5656

57-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
57+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
5858
--> $DIR/feature-gate-extern_crate_item_prelude.rs:20:20
5959
|
6060
LL | type A = ::alloc::boxed::Box<u8>;
6161
| ^^^^^
6262
|
6363
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable
6464

65-
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
65+
error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #55599)
6666
--> $DIR/feature-gate-extern_crate_item_prelude.rs:42:14
6767
|
6868
LL | type A = core::boxed::Box<u8>;

src/test/ui/feature-gates/feature-gate-extern_in_paths.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: `extern` in paths is experimental (see issue #44660)
1+
error[E0658]: `extern` in paths is experimental (see issue #55600)
22
--> $DIR/feature-gate-extern_in_paths.rs:14:13
33
|
44
LL | let _ = extern::std::vec::Vec::new(); //~ ERROR `extern` in paths is experimental

src/test/ui/feature-gates/feature-gate-panic-implementation.rs

-21
This file was deleted.

src/test/ui/feature-gates/feature-gate-panic-implementation.stderr

-11
This file was deleted.

src/test/ui/panic-implementation/panic-implementation-deprecated.rs

-24
This file was deleted.

src/test/ui/panic-implementation/panic-implementation-deprecated.stderr

-14
This file was deleted.

0 commit comments

Comments
 (0)