diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 24 |
2 files changed, 23 insertions, 7 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 412a3493208..2cfb1616927 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -249,6 +249,8 @@ pub trait AstBuilder { name: Ident, attrs: Vec<ast::Attribute>, items: Vec<P<ast::Item>>) -> P<ast::Item>; + fn item_extern_crate(&self, span: Span, name: Ident) -> P<ast::Item>; + fn item_static(&self, span: Span, name: Ident, @@ -1095,6 +1097,10 @@ impl<'a> AstBuilder for ExtCtxt<'a> { ) } + fn item_extern_crate(&self, span: Span, name: Ident) -> P<ast::Item> { + self.item(span, name, Vec::new(), ast::ItemKind::ExternCrate(None)) + } + fn item_static(&self, span: Span, name: Ident, diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index df8ee189d21..0163bb3b1d0 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -137,7 +137,6 @@ declare_features! ( (active, placement_in_syntax, "1.0.0", Some(27779)), (active, unboxed_closures, "1.0.0", Some(29625)), - (active, allocator, "1.0.0", Some(27389)), (active, fundamental, "1.0.0", Some(29635)), (active, main, "1.0.0", Some(29634)), (active, needs_allocator, "1.4.0", Some(27389)), @@ -360,6 +359,10 @@ declare_features! ( // Allows unsized tuple coercion. (active, unsized_tuple_coercion, "1.20.0", Some(42877)), + + // global allocators and their internals + (active, global_allocator, "1.20.0", None), + (active, allocator_internals, "1.20.0", None), ); declare_features! ( @@ -379,6 +382,7 @@ declare_features! ( // rustc internal (removed, unmarked_api, "1.0.0", None), (removed, pushpop_unsafe, "1.2.0", None), + (removed, allocator, "1.0.0", None), ); declare_features! ( @@ -585,16 +589,22 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG "the `#[rustc_on_unimplemented]` attribute \ is an experimental feature", cfg_fn!(on_unimplemented))), - ("allocator", Whitelisted, Gated(Stability::Unstable, - "allocator", - "the `#[allocator]` attribute is an experimental feature", - cfg_fn!(allocator))), + ("global_allocator", Normal, Gated(Stability::Unstable, + "global_allocator", + "the `#[global_allocator]` attribute is \ + an experimental feature", + cfg_fn!(global_allocator))), + ("default_lib_allocator", Whitelisted, Gated(Stability::Unstable, + "allocator_internals", + "the `#[default_lib_allocator]` \ + attribute is an experimental feature", + cfg_fn!(allocator_internals))), ("needs_allocator", Normal, Gated(Stability::Unstable, - "needs_allocator", + "allocator_internals", "the `#[needs_allocator]` \ attribute is an experimental \ feature", - cfg_fn!(needs_allocator))), + cfg_fn!(allocator_internals))), ("panic_runtime", Whitelisted, Gated(Stability::Unstable, "panic_runtime", "the `#[panic_runtime]` attribute is \ |
