Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rm const traits in libcore #110393

Merged
merged 15 commits into from
Apr 19, 2023
Prev Previous commit
Next Next commit
make rustc compilable
fee1-dead committed Apr 16, 2023
commit ede7bc032a7a447ffce7a4c3fc1b1fc72842386b
1 change: 0 additions & 1 deletion compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
3 changes: 2 additions & 1 deletion compiler/rustc_ast/src/ptr.rs
Original file line number Diff line number Diff line change
@@ -126,7 +126,8 @@ impl<S: Encoder, T: Encodable<S>> Encodable<S> for P<T> {
}

impl<T> P<[T]> {
pub const fn new() -> P<[T]> {
// FIXME(const-hack) make this const again
pub fn new() -> P<[T]> {
P { ptr: Box::default() }
}