-
Notifications
You must be signed in to change notification settings - Fork 13k
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 7 pull requests #111710
Rollup of 7 pull requests #111710
Conversation
This adds `unaligned-scalar-mem` as an allowed RISC-V target feature. Some RISC-V cores support unaligned access to memory without trapping. On such cores, the compiler could significantly improve code-size and performance when using functions like core::ptr::read_unaligned<u32> by emitting a single load or store instruction with an unaligned address, rather than a long sequence of byte load/store/bitmanip instructions. Enabling the `unaligned-scalar-mem` target feature allows LLVM to do this optimization. Fixes rust-lang#110883
The main workspace, bootstrap, cargo, miri, and rust-analyzer all lock serde to different versions. It's preferable to share the same version where possible, so update it. Rustfmt is synced from another repository and has its own Cargo.lock, but since it's added to the overall workspace it should respect the version here. Cargo is already at the latest version. Miri and rust-analyzer would require upstream updates.
It's unused.
Error message all end up passing into a function as an `impl Into<{D,Subd}iagnosticMessage>`. If an error message is creatd as `&format("...")` that means we allocate a string (in the `format!` call), then take a reference, and then clone (allocating again) the reference to produce the `{D,Subd}iagnosticMessage`, which is silly. This commit removes the leading `&` from a lot of these cases. This means the original `String` is moved into the `{D,Subd}iagnosticMessage`, avoiding the double allocations. This requires changing some function argument types from `&str` to `String` (when all arguments are `String`) or `impl Into<{D,Subd}iagnosticMessage>` (when some arguments are `String` and some are `&str`).
The libs team is currently reworking the ACP process and we don't want to encourage people to submit new ACPs in the meantime.
…leywiser Support RISC-V unaligned-scalar-mem target feature This adds `unaligned-scalar-mem` as an allowed RISC-V target feature. Some RISC-V cores support unaligned access to memory without trapping. On such cores, the compiler could significantly improve code-size and performance when using functions like core::ptr::read_unaligned<u32> by emitting a single load or store instruction with an unaligned address, rather than a long sequence of byte load/store/bitmanip instructions. Enabling the `unaligned-scalar-mem` target feature allows LLVM to do this optimization. Fixes rust-lang#110883
…lacrum Update serde in workspace and non-synced dependencies The main workspace, bootstrap, cargo, miri, and rust-analyzer all lock serde to different versions. It's preferable to share the same version where possible, so update it. Rustfmt is synced from another repository and has its own Cargo.lock, but since it's added to the overall workspace it should respect the version here. Cargo is already at the latest version. Miri and rust-analyzer would require upstream updates.
…ark-Simulacrum Specialize ToString implementation for fmt::Arguments Generates far fewer instructions by formatting into a String with `fmt::format` directly instead of going through the `fmt::Display` impl. This change is insta-stable.
…, r=Mark-Simulacrum add examples of port 0 binding behavior Was trying to find the method to specify the IP address but not the port, and there wasn't information easily accessible about it in the `TcpListener` or `SocketAddr`. Adding examples to `TcpListener` and `UdpSocket` for clarity.
…rk-Simulacrum Include better context for "already exists" error in compiletest I encountered the following error from `x.py test tests/ui` today. ```console ---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ---- thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 17, kind: AlreadyExists, message: "File exists" }', src/tools/compiletest/src/runtest.rs:134:43 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` I found it impossible to unblock myself without knowing which directory it was stuck on. Error message after this PR: ```console ---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ---- thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: failed to create output base directory /git/rust/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes Caused by: File exists (os error 17)', src/tools/compiletest/src/runtest.rs:139:10 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Now I was able to run `rm build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes` and unblock myself. Seems to be related to rust-lang#109509 moving *tests/ui/impl-trait/multiple-lifetimes.rs* to *tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs*.
…ffleLapkin Avoid `&format("...")` calls in error message code. Some error message cleanups. Best reviewed one commit at a time. r? `@davidtwco`
…ou-se Remove libs message about ACPs from triagebot The libs team is currently reworking the ACP process and we don't want to encourage people to submit new ACPs in the meantime.
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 77c836e1ae In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (9052ca9): 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)ResultsThis 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.
CyclesResultsThis 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 sizeResultsThis 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.
Bootstrap: 641.625s -> 641.167s (-0.07%) |
Successful merges:
&format("...")
calls in error message code. #111633 (Avoid&format("...")
calls in error message code.)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup