-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
core: Stabilize the mem module #14259
Conversation
Why remove |
There are very few users of it, it doesn't have many applications, and it's very easy to make a wrapper for. |
It's only used for (Well, it's also used for |
pub fn size_of<T>() -> uint { | ||
unsafe { intrinsics::size_of::<T>() } | ||
} | ||
|
||
/// Returns the size of the type that `_val` points to in bytes. | ||
#[inline] | ||
#[stable] | ||
pub fn size_of_val<T>(_val: &T) -> uint { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking about it now, do we want to stabilise the abbreviated name size_of_val
(rather than calling it size_of_value
or some such)?
Pushed a commit with some re-wordings. I'd vote for |
@huonw: The only usage in |
@alexcrichton Would it be reasonable to not stabilise the @thestinger even better! |
Good point! I've marked the |
I thought the outcome of the meeting was that |
Hm, shouldn't the old functions be there with a |
Excluding the functions inherited from the cast module last week (with marked stability levels), these functions received the following treatment. * size_of - this method has become #[stable] * nonzero_size_of/nonzero_size_of_val - these methods have been removed * min_align_of - this method is now #[stable] * pref_align_of - this method has been renamed without the `pref_` prefix, and it is the "default alignment" now. This decision is in line with what clang does (see url linked in comment on function). This function is now #[stable]. * init - renamed to zeroed and marked #[stable] * uninit - marked #[stable] * move_val_init - renamed to overwrite and marked #[stable] * {from,to}_{be,le}{16,32,64} - all functions marked #[stable] * swap/replace/drop - marked #[stable] * size_of_val/min_align_of_val/align_of_val - these functions are marked #[unstable], but will continue to exist in some form. Concerns have been raised about their `_val` prefix. [breaking-change]
Excluding the functions inherited from the cast module last week (with marked stability levels), these functions received the following treatment. * size_of - this method has become #[stable] * nonzero_size_of/nonzero_size_of_val - these methods have been removed * min_align_of - this method is now #[stable] * pref_align_of - this method has been renamed without the `pref_` prefix, and it is the "default alignment" now. This decision is in line with what clang does (see url linked in comment on function). This function is now #[stable]. * init - renamed to zeroed and marked #[stable] * uninit - marked #[stable] * move_val_init - renamed to overwrite and marked #[stable] * {from,to}_{be,le}{16,32,64} - all functions marked #[stable] * swap/replace/drop - marked #[stable] * size_of_val/min_align_of_val/align_of_val - these functions are marked #[unstable], but will continue to exist in some form. Concerns have been raised about their `_val` prefix.
Excluding the functions inherited from the cast module last week (with marked
stability levels), these functions received the following treatment.
pref_
prefix, and it is the "default alignment" now. This decision is in linewith what clang does (see url linked in comment on function). This function
is now #[stable].
#[unstable], but will continue to exist in some form. Concerns have been
raised about their
_val
prefix.