-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 13 pull requests #138152
Closed
Closed
Rollup of 13 pull requests #138152
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch makes BufReader::peek()'s doctest call read_more() to refill the buffer before the inner reader hits EOF. This exposes a bug in read_more() that causes an out-of-bounds slice access and segfault.
Buffer::read_more() is supposed to refill the buffer without discarding its contents, which are in the range `pos .. filled`. It mistakenly borrows the range `pos ..`, fills that, and then increments `filled` by the amount read. This overwrites the buffer's existing contents and sets `filled` to a too-large value that either exposes uninitialized bytes or walks off the end of the buffer entirely. This patch makes it correctly fill only the unfilled portion of the buffer, which should maintain all the type invariants and fix the test failure introduced in commit b119671.
Use default field values to avoid manual `Default` impl.
Remove manual `Default` impl from `config::ErrorOutputType`.
It's clearer than using `kw::Empty` to mean `None`.
Currently it relies on special treatment of `kw::Empty`, which is really easy to get wrong. This commit makes the special case clearer in the type system by using `Option`. It's a bit clumsy, but the synthetic name handling itself is a bit clumsy; better to make it explicit than sneak it in. Fixes rust-lang#133426.
…ception in hir-pretty
While it shares more than zero code with the SysV x86-32 ABI impl, there is no particular reason to organize wildly different ABIs using if-else in the same function.
…viper Revert vita's c_char back to i8 # Description Hi! rust-lang#132975 changed the definition of `c_char` from i8 to u8 for most ARM targets. While that would usually be correct, [VITASDK uses signed chars by default](https://github.com/vitasdk/buildscripts/blob/master/patches/gcc/0001-gcc-10.patch#L33-L34). The Clang definitions are incorrect because Clang is not (yet?) supported by the vita commmunity / `VITADSK`, On the Rust side, the pre-compiled libraries the user can link to are all compiled using vita's `gcc` and [we set `TARGET_CC` and `TARGET_CXX`](https://github.com/vita-rust/cargo-vita/blob/d564a132cbd43947118c0d6d0ebfbea7d1dd7fa7/src/commands/build.rs#L230) in `cargo vita` for build scripts using `cc`. I'm creating it as a draft PR so that we can discuss it and possibly get it approved here, but wait to merge the [libc side](rust-lang/libc#4258) and get a libc version first, as having the definitions out of sync breaks std. As a nightly-only target it can be confusing/frustrating for new users when the latest nightly, which is the default, is broken.
…pl, r=jieyouxu compiler: factor Windows x86-32 ABI impl into its own file While it shares more than zero code with the SysV x86-32 ABI impl, there is no particular reason to organize wildly different ABIs using if-else in the same function.
Windows: Fix error in `fs::rename` on Windows 1607 Fixes rust-lang#137499 There's a bug in our Windows implementation of `fs::rename` that only manifests on a specific version of Windows. Both newer and older versions of Windows work. I took the safest route to fixing this by using the old `MoveFileExW` function to implement this and only falling back to the new behaviour if that fails. This is similar to what is done in `unlink` (just above this function). try-job: dist-x86_64-mingw try-job: dist-x86_64-msvc
Update bootstrap to edition 2024 The stage0 compiler now supports edition 2024, so we can update bootstrap to it. I manually reviewed all the changes from `cargo fix --edition` and reverted most of them (`if let` -> `matches` changes and two unneeded usages of `use <>`). r? `@onur-ozkan`
Enable `f16` for LoongArch Blocked on rust-lang/compiler-builtins#770 r? `@tgross35` Tracking issue for f16: rust-lang#116909 try-job: dist-loongarch64-linux try-job: dist-loongarch64-musl
Fix crash in BufReader::peek() `bufreader_peek` tracking issue: rust-lang#128405 This fixes a logic error in `Buffer::read_more()` that would make `BufReader::peek()` expose uninitialized data and/or segfault if `read_more()` was called with a partially-full buffer and a non-empty inner reader.
…storino Reduce `kw::Empty` usage, part 1 This PR fixes some confusing `kw::Empty` usage, fixing a crash test along the way. r? `@spastorino`
…iler-errors Revert rust-lang#138019 after further discussion about how hir-pretty printing should work After some more discussion, rust-lang#138019 was probably merged a little fast. Though there probably is a real bug in pretty printing, it is not feasible to add similar pretty printing routines for all attributes, and making this specific exception is likely not desired either. For more context, see post-merge comments on rust-lang#138019 I kept the tests around, but reverted the hir-pretty change. r? `@compiler-errors`
…llaumeGomez `librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment)) r? `@GuillaumeGomez`
Use `default_field_values` for `rustc_errors::Context`, `rustc_session::config::NextSolverConfig` and `rustc_session::config::ErrorOutputType` Wanted to see where `#![feature(default_field_values)]` could be used in the codebase. These three seemed like no-brainers. There are a bunch of more places where we could remove manual `Default` impls, but they `derive` other traits that rely on `syn`, which [doesn't yet support `default_field_values`](dtolnay/syn#1774).
…yUwU Suggest typo fix for static lifetime ...and don't try to introduce a new lifetime param named something like `'statoc`.
…gestion, r=compiler-errors Simplify `printf` and shell format suggestions Simplify tracking `printf` and shell format suggestions. Although allocations could be deferred until after checking that they aren't already in the map, this style is simpler.
…=tgross35 Stabilize const_char_classify, const_sockaddr_setters FCP for const_char_classify: rust-lang#132241 FCP for const_sockaddr_setters: rust-lang#131714 Fixes rust-lang#132241 Fixes rust-lang#131714 Cc ```@rust-lang/wg-const-eval```
@bors r+ rollup=never p=5 |
The job Click to see the possible cause of the failure (guessed by this bot)
|
This was referenced Mar 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-compiletest
Area: The compiletest test runner
A-testsuite
Area: The testsuite used to check the correctness of rustc
O-windows
Operating system: Windows
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
T-rustdoc-frontend
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
fs::rename
on Windows 1607 #137528 (Windows: Fix error infs::rename
on Windows 1607)f16
for LoongArch #137674 (Enablef16
for LoongArch)kw::Empty
usage, part 1 #137977 (Reducekw::Empty
usage, part 1)#[deprecated]
attribute in HIR. #138019 after further discussion about how hir-pretty printing should work)librustdoc
: clippy fixes #138107 (librustdoc
: clippy fixes)default_field_values
forrustc_errors::Context
,rustc_session::config::NextSolverConfig
andrustc_session::config::ErrorOutputType
#138111 (Usedefault_field_values
forrustc_errors::Context
,rustc_session::config::NextSolverConfig
andrustc_session::config::ErrorOutputType
)printf
and shell format suggestions #138125 (Simplifyprintf
and shell format suggestions)Failed merges:
size_of
from the prelude instead of imported #138034 (library: Usesize_of
from the prelude instead of imported)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup