-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 9 pull requests #127840
Rollup of 9 pull requests #127840
Conversation
I’ve found myself visiting the documentation for `std::env::vars` every few months, and every time I do, it is because I want to quickly get a snippet to print out all environment variables :-) So I think it could be nice to simplify the examples a little to make them self-contained. It is of course a style question if one should import a module a not, but I personally don’t import modules used just once in a code snippet.
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
There are some comments describing multiple subsequent `use` items. When the big `use` reformatting happens some of these `use` items will be reordered, possibly moving them away from the comment. With this additional level of formatting it's not really feasible to have comments of this type. This commit removes them in various ways: - merging separate `use` items when appropriate; - inserting blank lines between the comment and the first `use` item; - outright deletion (for comments that are relatively low-value); - adding a separate "top-level" comment. We also entirely skip formatting for four library files that contain nothing but `pub use` re-exports, where reordering would be painful.
When we do the big `use` reformatting there are a tiny number of cases where rustfmt moves a comment from one `use` item to another in an undesirable way. This commit pre-emptively rearranges things to prevent this from happening.
This also adds an additional `unsafe` block to address compiler errors.
…jhpratt,tgross35 Simplify environment variable examples I’ve found myself visiting the documentation for `std::env::vars` every few months, and every time I do, it is because I want to quickly get a snippet to print out all environment variables :-) So I think it could be nice to simplify the examples a little to make them self-contained. It is of course a style question if one should import a module a not, but I personally don’t import modules used just once in a code snippet.
… r=tgross35 Skip fast path for dec2flt when optimize_for_size Tracking issue: rust-lang#125612 Skip the fast algorithm when optimizing for size. When compiling for https://github.com/quartiq/stabilizer I get these numbers: Before ``` text data bss dec hex filename 192192 8 49424 241624 3afd8 dual-iir ``` After ``` text data bss dec hex filename 191632 8 49424 241064 3ada8 dual-iir ``` This saves 560 bytes.
…ps-2, r=cuviper Clean up more comments near use declarations rust-lang#125443 will reformat all use declarations in the repository. There are a few edge cases involving comments on use declarations that require care. This PR fixes them up so rust-lang#125443 can go ahead with a simple `x fmt --all`. A follow-up to rust-lang#126717. r? ``@cuviper``
`impl Send + Sync` and override `count` for the `CStr::bytes` iterator cc tracking issue rust-lang#112115
…kargs, r=compiler-errors Terminate `--print link-args` output with newline Fixes rust-lang#127507
…warfier, r=joboet std: Use `read_unaligned` for reads from DWARF There's a lot of... *stuff* going on here. Meanwhile, `read_unaligned` has been available since 1.17.0, so let's just use that.
Use futex.rs for Windows thread parking If I'm not overlooking anything then the Windows 10+ thread parking implementation is practically the same as the futex.rs implementation. So we may as well use the same implementation for both. The old version is still kept around for Windows 7 support. r? ````@joboet```` if you wouldn't mind double checking I've not missed something
…kingjubilee zkvm: add `#[forbid(unsafe_op_in_unsafe_fn)]` in `stdlib` This also adds an additional `unsafe` block to address compiler errors. This PR is intended to address rust-lang#127747 for the zkvm target.
…n-xous-uefi, r=tgross35 std: Forbid unwrapped unsafe ops in xous and uefi modules
@bors r+ rollup=never p=9 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 1a6e777c3c In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (a28b35e): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary -1.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 769.376s -> 768.03s (-0.17%) |
Successful merges:
impl Send + Sync
and overridecount
for theCStr::bytes
iterator #127444 (impl Send + Sync
and overridecount
for theCStr::bytes
iterator)--print link-args
output with newline #127512 (Terminate--print link-args
output with newline)read_unaligned
for reads from DWARF #127792 (std: Useread_unaligned
for reads from DWARF)#[forbid(unsafe_op_in_unsafe_fn)]
instdlib
#127833 (zkvm: add#[forbid(unsafe_op_in_unsafe_fn)]
instdlib
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup