From ede7bc032a7a447ffce7a4c3fc1b1fc72842386b Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sun, 16 Apr 2023 07:25:13 +0000 Subject: [PATCH] make rustc compilable --- compiler/rustc_ast/src/lib.rs | 1 - compiler/rustc_ast/src/ptr.rs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_ast/src/lib.rs b/compiler/rustc_ast/src/lib.rs index 23c32fa96ca4..b07ed1d1c741 100644 --- a/compiler/rustc_ast/src/lib.rs +++ b/compiler/rustc_ast/src/lib.rs @@ -10,7 +10,6 @@ )] #![feature(associated_type_bounds)] #![feature(box_patterns)] -#![feature(const_default_impls)] #![feature(const_trait_impl)] #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/compiler/rustc_ast/src/ptr.rs b/compiler/rustc_ast/src/ptr.rs index 4b2850336a03..0140fb752bf9 100644 --- a/compiler/rustc_ast/src/ptr.rs +++ b/compiler/rustc_ast/src/ptr.rs @@ -126,7 +126,8 @@ impl> Encodable for P { } impl P<[T]> { - pub const fn new() -> P<[T]> { + // FIXME(const-hack) make this const again + pub fn new() -> P<[T]> { P { ptr: Box::default() } }