Skip to content

Commit 16c7206

Browse files
committed
Note some previous attempts to change the Default impl for [T; 0]
1 parent a015919 commit 16c7206

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/core/src/array/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,11 @@ impl<T: Copy> SpecArrayClone for T {
472472
// The Default impls cannot be done with const generics because `[T; 0]` doesn't
473473
// require Default to be implemented, and having different impl blocks for
474474
// different numbers isn't supported yet.
475+
//
476+
// Trying to improve the `[T; 0]` situation has proven to be difficult.
477+
// Please see these issues for more context on past attempts and crater runs:
478+
// - https://github.com/rust-lang/rust/issues/61415
479+
// - https://github.com/rust-lang/rust/pull/145457
475480

476481
macro_rules! array_impl_default {
477482
{$n:expr, $t:ident $($ts:ident)*} => {

0 commit comments

Comments
 (0)