Skip to content

core: Finish stabilizing the mem module. #14392

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

Merged
merged 1 commit into from
May 24, 2014

Conversation

alexcrichton
Copy link
Member

  • All of the *_val functions have gone from #[unstable] to #[stable]
  • The overwrite and zeroed functions have gone from #[unstable] to #[stable]
  • The uninit function is now deprecated, replaced by its stable counterpart,
    uninitialized

[breaking-change]

* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]
@@ -164,7 +164,7 @@ impl rtio::RtioFileStream for FileDesc {
}

fn fstat(&mut self) -> IoResult<io::FileStat> {
let mut stat: libc::stat = unsafe { mem::uninit() };
let mut stat: libc::stat = unsafe { mem::zeroed() };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason these changed to zeroed instead of uninitialized?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When doing FFI things I prefer to use zeroed things, I think I just accidentally left these all as uninitialized.

bors added a commit that referenced this pull request May 24, 2014
* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]
@bors bors closed this May 24, 2014
@bors bors merged commit 2fd4841 into rust-lang:master May 24, 2014
@alexcrichton alexcrichton deleted the mem-updates branch May 28, 2014 02:31
flip1995 added a commit to flip1995/rust that referenced this pull request Mar 20, 2025
…ust-lang#14392)

If types such as `Option<Option<String>>` are not used by value, then
`Option<Option<&String>>` will be suggested, instead of
`Option<&Option<String>>`.

changelog: [`needless_pass_by_value`]: suggest using a reference on the
innermost `Option` content

fix rust-lang#14375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants