From 16c720645cac29e71cc897374bb462fab42a8682 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sun, 14 Sep 2025 14:37:10 +1000 Subject: [PATCH] Note some previous attempts to change the Default impl for `[T; 0]` --- library/core/src/array/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index d14419a23a1d8..d713e575b58d3 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -472,6 +472,11 @@ impl SpecArrayClone for T { // The Default impls cannot be done with const generics because `[T; 0]` doesn't // require Default to be implemented, and having different impl blocks for // different numbers isn't supported yet. +// +// Trying to improve the `[T; 0]` situation has proven to be difficult. +// Please see these issues for more context on past attempts and crater runs: +// - https://github.com/rust-lang/rust/issues/61415 +// - https://github.com/rust-lang/rust/pull/145457 macro_rules! array_impl_default { {$n:expr, $t:ident $($ts:ident)*} => {