-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 6 pull requests #97574
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
Rollup of 6 pull requests #97574
Conversation
This transforms `|| expr` into `|| { expr; }`.
Currently, `Box<T>` gets `noalias`, meaning it has the same rules as `&mut T`. This is sparsely documented, even though it can have quite a big impact on unsafe code using box. Therefore, these rules are documented here, with a big warning that they are not normative and subject to change, since we have not yet committed to an aliasing model and the state of `Box<T>` is especially uncertain.
…`suggest_missing_semicolon()`
…me-display, r=jsha Improve settings theme display This is a follow-up of rust-lang#96958. In this PR, I changed how the theme radio buttons are displayed and improved their look as well. It now looks like this:   You can test it [here](https://rustdoc.crud.net/imperio/improve-settings-theme-display/doc/foo/index.html). r? `@jsha`
Document the current aliasing rules for `Box<T>`. Currently, `Box<T>` gets `noalias`, meaning it has the same rules as `&mut T`. This is sparsely documented, even though it can have quite a big impact on unsafe code using box. Therefore, these rules are documented here, with a big warning that they are not normative and subject to change, since we have not yet committed to an aliasing model and the state of `Box<T>` is especially uncertain. If you have any suggestions and improvements, make sure to leave them here. This is mostly intended to inform people about what is currently going on (to prevent misunderstandings such as [Jon Gjengset's Box aliasing](https://www.youtube.com/watch?v=EY7Wi9fV5bk)). This is supposed to _only document current UB_ and not add any new guarantees or rules.
…dd-semicolon, r=oli-obk Suggest adding a semicolon to a closure without block This transforms `|| expr` into `|| { expr; }`. Closes rust-lang#97359.
…nto, r=dtolnay Stabilize `toowned_clone_into` Closes rust-lang#41263 FCP has been done: rust-lang#41263 (comment)
Add doc alias `memset` to `write_bytes` I were looking for `memset` in rust, but the docs only pointed me to `slice::fill`. With only the old aliases, one might write code like this, which is incorrect if the memory is uninitialized. ``` Rust core::slice::from_raw_parts(ptr, len).fill(0) ```
…nieu Remove `memset` alias from `fill_with`. In https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Unsafe.20and.20Safe.20versions.20of.20APIs.20both.20getting.20the.20same.20alias/near/284413029 `@Amanieu` pointed out that we had this, which is not really right. In our guidelines we say that we will "not add an alias for a function that's only somewhat similar or related", which applies here. Memset doesn't take a closure, not even conceptually.
@bors r+ rollup=never p=5 |
📌 Commit efd2519 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d35d972): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Successful merges:
Box<T>
. #97229 (Document the current aliasing rules forBox<T>
.)toowned_clone_into
#97455 (Stabilizetoowned_clone_into
)memset
towrite_bytes
#97565 (Add doc aliasmemset
towrite_bytes
)memset
alias fromfill_with
. #97569 (Removememset
alias fromfill_with
.)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup