| Age | Commit message (Collapse) | Author | Lines |
|
(cherry picked from commit 3cb53df1feaba73b84344c8c0e3dc4120ad8c95b)
|
|
(cherry picked from commit 0dfe2ae3fb72c50ea369286131c73daede13d7e5)
|
|
(cherry picked from commit 35febd7a6d57179f41cb5b4a37f9545915e4d7a5)
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #135687 (re-export `FromCoroutine` from `core::iter`)
- #135813 (CI: split i686-mingw job to three free runners)
- #136749 (Implement Extend<AsciiChar> for String)
- #136879 (Add safe new() to NotAllOnes)
- #136978 (Windows: Update generated bindings)
- #137028 (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR)
- #137029 (Remove unnecessary check code in unused_delims)
- #137056 (made check_argument_compat public for use in miri)
- #137062 (Forward all default methods for I/O impls)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=workingjubilee
Forward all default methods for I/O impls
Forward all default methods for `&mut T` and `Box<T>` to the inner `io::Read`, `io::Write`, `io::Seek`, and `io::BufRead` types.
|
|
Windows: Update generated bindings
Update to windows-bindgen 0.59.
This update is aimed at reducing churn in the future, but means a bit more churn now:
- `bindings.txt` no longer needs us to write the namespace for each item. This is good because it means in the future we won't need to change them if the namespace changes. However, there are a few where we still need to disambiguate due to duplicate items (this is a bug in the upstream metadata).
- The output in `windows-sys.rs` is now sorted. It was mostly sorted before but not intentionally. This should mean future changes are less noisy.
The actual code changes are minimal here. A few types are now `bool` instead of `BOOLEAN`, which is more convenient.
|
|
Add safe new() to NotAllOnes
Replaces duplicated `unsafe` code with a single, easier to verify implementation.
|
|
|
|
Implement `f{16,32,64,128}::{erf,erfc}` (`#![feature(float_erf)]`)
Tracking issue: #136321
try-job: x86_64-gnu-aux
|
|
Prepare standard library for Rust 2024 migration
This includes a variety of commits preparing the standard library for migration to Rust 2024.
The actual migration is blocked on a few things, so I wanted to get this out of the way in a relatively digestable PR.
|
|
Use `slice::fill` in `io::Repeat` implementation
Use the existing `fill` methods on slices instead of manually writing the fill loop.
|
|
Remove the common prelude module
This fixes the issues described in https://github.com/rust-lang/rust/issues/136102. Primarily, this resolves some issues with how the documentation for the prelude is generated:
- It avoids showing "unstable" for macros in the prelude that are actually stable.
- Avoids duplication of some pages due to the previous lack of `doc(no_inline)`.
- Makes the different edition preludes consistent, and sets a pattern that can be used by future editions.
We may need to rearrange these modules in the future if we decide to remove anything from the prelude again. If we do, I think we should look into a different solution that avoids the documentation problems.
Closes https://github.com/rust-lang/rust/issues/136102
|
|
Correct comment for FreeBSD and DragonFly BSD in unix/thread
|
|
|
|
[AIX] expect `EINVAL` for `pthread_mutex_destroy`
Calling `pthread_mutex_destory` on a mutex initalized with the static initializer macro `PTHREAD_MUTEX_INITIALIZER` will result in `EINVAL` if the mutex is not lock/unlocked prior to calling `pthread_mutex_destroy`.
|
|
Also add
```rust
// #[unstable(feature = "float_gamma", issue = "99842")]
```
to `gamma`-function-related methods on `f16` & `f128`,
as per https://github.com/rust-lang/rust/pull/136324#issuecomment-2626270247
|
|
|
|
|
|
|
|
This generates a warning of irrefutable patterns. I decided to slightly
tweak the example so the closure returns unit, since the intent wasn't
to show the weird behavior of returning `!`.
|
|
|
|
|
|
Stabilize `get_many_mut` as `get_disjoint_mut`
Tracking issue: #104642
Closes #104642
FCP completed in https://github.com/rust-lang/rust/issues/104642#issuecomment-2558161073
|
|
Use the existing `fill` methods on slices instead of manually
writing the fill loop.
|
|
|
|
Add diagnostic item for `std::io::BufRead`
This will be used in Clippy to detect unbuffered calls to `Read::bytes()`.
|
|
Implement `read*_exact` for `std:io::repeat`
cc #136756
|
|
std: replace the `FromInner` implementation for addresses with private conversion functions
Having these implementation available crate-wide means that platforms not using sockets for their networking code have to stub out the libc definitions required to support them. This PR moves the conversions to private helper functions that are only available where actually needed.
I also fixed the signature of the function converting from a C socket address to a Rust one: taking a reference to a `sockaddr_storage` resulted in unsound usage inside `LookupHost::next`, which could create a reference to a structure smaller than `sockaddr_storage`. Thus I've replaced the argument type with a pointer and made the function `unsafe`.
|
|
This will be used in Clippy to detect unbuffered calls to
`Read::bytes()`.
|
|
conversion functions
Having these implementation available crate-wide means that platforms not using sockets for their networking code have to stub out the libc definitions required to support them. This PR moves the conversions to private helper functions that are only available where actually needed.
I also fixed the signature of the function converting from a C socket address to a Rust one: taking a reference to a `sockaddr_storage` resulted in unsound usage inside `LookupHost::next`, which could create a reference to a structure smaller than `sockaddr_storage`. Thus I've replaced the argument type with a pointer and made the function `unsafe`.
|
|
Rollup of 8 pull requests
Successful merges:
- #134981 ( Explain that in paths generics can't be set on both the enum and the variant)
- #136698 (Replace i686-unknown-redox target with i586-unknown-redox)
- #136767 (improve host/cross target checking)
- #136829 ([rustdoc] Move line numbers into the `<code>` directly)
- #136875 (Rustc dev guide subtree update)
- #136900 (compiler: replace `ExternAbi::name` calls with formatters)
- #136913 (Put kobzol back on review rotation)
- #136915 (documentation fix: `f16` and `f128` are not double-precision)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Revert "Stabilize `extended_varargs_abi_support`"
I cannot find an FCP for this, despite it being a stabilization PR which normally means we do an FCP of some kind? It would seem reasonable for _either_ compiler or lang to have FCPed it? I am thus opening a revert PR, which mostly-cleanly applies, so that we can later actually land this properly with a stability report and FCP.
- https://github.com/rust-lang/rust/issues/136896
- https://github.com/rust-lang/rust/pull/116161
- https://github.com/rust-lang/rust/issues/100189
|
|
|
|
|
|
|
|
And leave a comment on the unusual `cfg_attr`
Co-authored-by: waffle <waffle.lapkin@gmail.com>
|
|
This reverts commit 685f189b4307435b83d625fea397ef36dff4e955.
|
|
This fixes the issues described in
https://github.com/rust-lang/rust/issues/136102. Primarily, this
resolves some issues with how the documentation for the prelude is
generated:
- It avoids showing "unstable" for macros in the prelude that are
actually stable.
- Avoids duplication of some pages due to the previous lack of
`doc(no_inline)`.
- Makes the different edition preludes consistent, and sets a pattern
that can be used by future editions.
We may need to rearrange these modules in the future if we decide to
remove anything from the prelude again. If we do, I think we should look
into a different solution that avoids the documentation problems.
|
|
Update docs for impl keyword
This started as a fix for #79878, but also introduces some structure (headings), and elaborates a tiny bit on impl Trait syntax.
|
|
|
|
Improve examples for file locking
The `lock` and `try_lock` documentation states that "if the file not open for writing, it is unspecified whether this function returns an error." With this change, the examples use `File::create` instead of `File::open`, eliminating the possibility of someone blindly copying code with unspecified behavior.
|
|
rustfmt fails to format this match expression, because it has several
long string literals over the maximum line width. This seems to exhibit
rustfmt issues #3863 (Gives up on chains if any line is too long) and
#3156 (Fail to format match arm when other arm has long line).
|
|
cc #136756
|
|
Some miscellaneous edition-related library tweaks
Some library edition tweaks that can be done separately from upgrading the whole standard library to edition 2024 (which is blocked on getting the submodules upgraded, for example)
|
|
Use an `Option` for `FindNextFileHandle` in `ReadDir` instead of `INVALID_FILE_HANDLE` sentinel value
Sometimes we store an invalid handle when we don't want to return an error. We then check the handle before use in order to avoid actually using the invalid handle. However, using an `Option` for this is better and avoids us forgetting to check the handle is valid. This was noticed due to us closing the handle without checking for validity: https://github.com/rust-lang/rust/blob/bd6a6777f5cbbec549f123995026cef76d1e6b84/library/std/src/sys/pal/windows/fs.rs#L148-L151
|
|
|
|
|
|
|
|
Update bootstrap compiler and rustfmt
The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same
time.
|