forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libstd: Use std::array::from_fn to implement Default for arrays large…
…r than 32 elements. Much like rust-lang#74060 did for every other trait. This avoids tools like rust-bindgen having to painfully work around this limitations, sometimes incorrectly like in rust-lang/rust-bindgen#2803
- Loading branch information
Showing
4 changed files
with
14 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,4 +63,8 @@ pub fn yes_ord() -> impl Ord { | |
[0; 32] | ||
} | ||
|
||
pub fn yes_default() -> impl Default { | ||
[0; 32] | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,4 +63,8 @@ pub fn yes_ord() -> impl Ord { | |
[0; 33] | ||
} | ||
|
||
pub fn yes_default() -> impl Default { | ||
[0; 33] | ||
} | ||
|
||
fn main() {} |