- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Add doc alias memset to write_bytes
          #97565
        
          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
Conversation
| Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any  Examples of  
 | 
| r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) | 
| Hmm, I'm inclined to allow this, but we do say that we don't want to do this in the alias policy: https://std-dev-guide.rust-lang.org/documentation/doc-alias-policy.html 
 Hmm... I'll bring it up on zulip. | 
| We already have  | 
| I brought it up here: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Unsafe.20and.20Safe.20versions.20of.20APIs.20both.20getting.20the.20same.20alias. I think it might be worth changing our policy to allow this, possibly. | 
| I think there's enough precedent here and it's uncontroversial enough that we'll take it, regardless of whether or not we change the guidelines. @bors r+ rollup | 
| 📌 Commit e565bb0 has been approved by  | 
Rollup of 6 pull requests Successful merges: - rust-lang#97089 (Improve settings theme display) - rust-lang#97229 (Document the current aliasing rules for `Box<T>`.) - rust-lang#97371 (Suggest adding a semicolon to a closure without block) - rust-lang#97455 (Stabilize `toowned_clone_into`) - rust-lang#97565 (Add doc alias `memset` to `write_bytes`) - rust-lang#97569 (Remove `memset` alias from `fill_with`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I were looking for
memsetin rust, but the docs only pointed me toslice::fill.With only the old aliases, one might write code like this, which is incorrect if the memory is uninitialized.