std: Second-pass stabilization of mem/default#19902
Conversation
This commit takes a second pass through the `std::mem` module for stabilization. The only remaining non-stable items in this module were `forget`, `transmute`, `copy_lifetime`, and `copy_lifetime_mut`. The `forget` and `transmute` intrinsics themselves were marked `#[stable]` to propgate into the `core::mem` module so they would be marked stable. The `copy_lifetime` functions were left `unstable`, but `Sized?` annotations were added to the parameters to allow more general use with DSTs. The `size_of_val`, `min_align_of_val`, and `align_of_val` functions would like to grow `Sized?` bounds, but this is a backwards compatible change that currently ICEs the compiler, so this change was not made at this time. Finally, the module itself was declared `#![stable]` in this pass.
cc0c5aa to
23bae85
Compare
This commit performs a second pass stabilization of the `std::default` module. The module was already marked `#[stable]`, and the inheritance of `#[stable]` was removed since this attribute was applied. This commit adds the `#[stable]` attribute to the trait definition and one method name, along with all implementations found in the standard distribution.
memmem/default
|
Threw in an easy commit for |
There was a problem hiding this comment.
This seemed suspicious to me, @aturon do you remember why this was here?
There was a problem hiding this comment.
I suspect there was some question whether Default should be implemented for [T] instead/as well.
There was a problem hiding this comment.
But that doesn't actually make sense, of course :-)
|
This looks fine to me. I think we've since come around to the utility of |
std: Second-pass stabilization of `mem`/`default` Reviewed-by: aturon
|
I am a strong believer in something like |
|
It's certainly a pretty harmless function to stabilize, I figured for now we could let feedback drive whether we stabilize it because I saw very few usages in the standard distribution at least. |
This commit stabilizes the `mem` and `default` modules of std.
std: Second-pass stabilization of `mem`/`default` Reviewed-by: aturon
Using a type alias for iterator implementations is fragile since this exposes the implementation to users of the iterator, and any changes could break existing code. This commit changes the iterators of `VecMap` to use proper new types, rather than type aliases. However, since it is fair-game to treat a type-alias as the aliased type, this is a: [breaking-change].
This commit stabilizes the `mem` and `default` modules of std.
This commit stabilizes the
memanddefaultmodules of std.