Skip to content

Commit d557771

Browse files
committed
Stabilize the #[global_allocator] attribute
Fixes rust-lang#27389
1 parent 39a6876 commit d557771

File tree

3 files changed

+3
-32
lines changed

3 files changed

+3
-32
lines changed

src/libsyntax/feature_gate.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,6 @@ declare_features! (
357357
// Trait aliases
358358
(active, trait_alias, "1.24.0", Some(41517), None),
359359

360-
// global allocators and their internals
361-
(active, global_allocator, "1.20.0", Some(27389), None),
362360
// rustc internal
363361
(active, allocator_internals, "1.20.0", None, None),
364362

@@ -609,6 +607,8 @@ declare_features! (
609607
(accepted, fn_must_use, "1.27.0", Some(43302), None),
610608
// Allows use of the :lifetime macro fragment specifier
611609
(accepted, macro_lifetime_matcher, "1.27.0", Some(34303), None),
610+
// The #[global_allocator] attribute
611+
(accepted, global_allocator, "1.28.0", Some(27389), None),
612612
);
613613

614614
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -770,11 +770,7 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
770770
"the `#[rustc_const_unstable]` attribute \
771771
is an internal feature",
772772
cfg_fn!(rustc_const_unstable))),
773-
("global_allocator", Normal, Gated(Stability::Unstable,
774-
"global_allocator",
775-
"the `#[global_allocator]` attribute is \
776-
an experimental feature",
777-
cfg_fn!(global_allocator))),
773+
("global_allocator", Normal, Ungated),
778774
("default_lib_allocator", Whitelisted, Gated(Stability::Unstable,
779775
"allocator_internals",
780776
"the `#[default_lib_allocator]` \

src/test/ui/feature-gate-global_allocator.rs

-14
This file was deleted.

src/test/ui/feature-gate-global_allocator.stderr

-11
This file was deleted.

0 commit comments

Comments
 (0)