| Age | Commit message (Collapse) | Author | Lines |
|
don't ICE now
|
|
Rollup of 4 pull requests
Successful merges:
- rust-lang/rust#139831 (rustdoc: on mobile, make the sidebar full width and linewrap)
- rust-lang/rust#140950 (More option optimization tests)
- rust-lang/rust#141108 (Docs(lib): Fix `extract_if` docs)
- rust-lang/rust#141361 (use `cfg_select!` to select the right `VaListImpl` definition)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
use `cfg_select!` to select the right `VaListImpl` definition
tracking issue: https://github.com/rust-lang/rust/issues/44930
Just a bit of cleanup really.
We could use `PhantomInvariantLifetime<'f>` (https://github.com/rust-lang/rust/issues/135806) to make it more precise what that `PhantomData<&'f mut &'f c_void>` marker is doing. I'm not sure how ready that feature is though, `@jhpratt` are these types good to use internally?
---
Some research into the lifetimes of `VaList` and `VaListImpl`:
It's easy to see why the lifetime of these types should not be extended, a `VaList` or `VaListImpl` escaping its function is a bad idea. I don't currently see why coercing the lifetime to a shorter lifetime is problematic though, but probably I just don't understand variance well enough to see it. The history does not provide much explanation:
- https://github.com/immunant/rust/commit/08140878fefaa4b16939b904bf825b7107069b42 original implementation
- https://github.com/immunant/rust/commit/b9ea653aee231114acbe6d4b3c7b1d692772d060 adds `VaListImpl<'f>`, but it is only covariant in `'f`
- https://github.com/rust-lang/rust/pull/62639 makes `VaListImpl<'f>` invariant over `'f` (because `VaList<'a, 'f>` is already invariant over `'f`, but I think that is just an implementation detail?)
Beyond that I don't see how the lifetime situation can be simplified significantly, e.g. this function really needs `'copy` to be unconstrained.
```rust
/// Copies the `va_list` at the current location.
pub unsafe fn with_copy<F, R>(&self, f: F) -> R
where
F: for<'copy> FnOnce(VaList<'copy, 'f>) -> R,
{
let mut ap = self.clone();
let ret = f(ap.as_va_list());
// SAFETY: the caller must uphold the safety contract for `va_end`.
unsafe {
va_end(&mut ap);
}
ret
}
```
`@rustbot` label +F-c_variadic
r? `@workingjubilee`
|
|
Docs(lib): Fix `extract_if` docs
Various fixes to the documentation comments of the several `extract_if` collection methods available. It originally started with a small typo fix in `Vec`'s spotted when reading the 1.87 release notes, but then by looking at the others' for comparison in order to try determining what was the intended sentence, some inconsistencies were spotted. Therefore, some other changes are also proposed here to reduce these avoidable differences, going more and more nit-picky along the way. See the individual commits for more details about each change.
`@rustbot` label T-libs A-collections A-docs
|
|
More option optimization tests
I noticed that although adding a manual implementation for PartialOrd on Option in #122024, I didn't add a test so that we can easily check if this behavior has improved.
This also adds a couple of `should-fail` tests - this will allow us to remove these hacky implementations if upstream LLVM improves.
|
|
rustdoc: on mobile, make the sidebar full width and linewrap
this is because the mobile sidebar cannot be resized, unlike on desktop.
|
|
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#140066 (Stabilize `<[T; N]>::as_mut_slice` as `const`)
- rust-lang/rust#141105 (additional edge cases tests for `path.rs` 🧪 )
- rust-lang/rust#141487 (Update askama to `0.14.0`)
- rust-lang/rust#141498 (Use C-string literals to reduce boilerplate)
- rust-lang/rust#141505 (rename internal panicking::try to catch_unwind)
- rust-lang/rust#141511 (Cleanup CodegenFnAttrFlags)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Cleanup CodegenFnAttrFlags
- Rename `USED` to `USED_COMPILER` to better reflect its behavior.
- Reorder some items to group the used and allocator flags together
- Renumber them without gaps
|
|
rename internal panicking::try to catch_unwind
The public function is called `catch_unwind`, the intrinsic at some point got renamed to `catch_unwind` -- there's no reason to have the internal implementation of this still be called `try`, so let's rename it to match the rest.
|
|
Use C-string literals to reduce boilerplate
Reduce boilerplate in doctests by replacing fallible function calls with
literals.
|
|
Update askama to `0.14.0`
[Askama 0.14.0 release notes](https://github.com/askama-rs/askama/releases/tag/v0.14.0)
Just one change needed for a filter in rustdoc.
r? ```@notriddle```
|
|
additional edge cases tests for `path.rs` 🧪
This pull request adds a few new edge case tests to the `std::path` module. The new tests cover scenarios such as paths with only separators, non-ASCII and Unicode characters, embedded new lines, etc. Each new test is documented with some helpful in-line comments as well.
|
|
Stabilize `<[T; N]>::as_mut_slice` as `const`
This is trivial and has no design questions.
Tracked in https://github.com/rust-lang/rust/issues/133333.
r? libs-api
|
|
- Rename `USED` to `USED_COMPILER` to better reflect its behavior.
- Reorder some items to group the used and allocator flags together
- Renumber them without gaps
|
|
Use the fn_span when emitting function calls for better debug info.
This especially improves the developer experience for long chains of function calls that span multiple lines, which is common with builder patterns, chains of iterator/future combinators, etc.
try-job: armhf-gnu
try-job: test-various
try-job: x86_64-msvc-1
try-job: arm-android
r? `@jieyouxu`
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #137323 (Guarantee behavior of transmuting `Option::<T>::None` subject to NPO)
- #139254 (std: sys: net: uefi: Implement TCP4 connect)
- #141432 (refactor `CanonicalVarKind`)
- #141480 (document some -Z flags as living in the rustc-dev-guide)
- #141486 (rustdoc book: add argument explanation for `html_playground_url`)
- #141496 (Enable `[issue-links]` and `[no-mentions]` in triagebot)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Enable `[issue-links]` and `[no-mentions]` in triagebot
This PR enables the [`[issue-links]`](https://forge.rust-lang.org/triagebot/issue-links.html) and [`[no-mentions]`](https://forge.rust-lang.org/triagebot/no-mentions.html) handlers of triagebot.
Most of our subtrees have already adopted them:
- https://github.com/rust-lang/rust-analyzer/pull/19555
- https://github.com/rust-lang/rust-clippy/pull/14563 & https://github.com/rust-lang/rust-clippy/pull/14576
- https://github.com/rust-lang/rustc-dev-guide/pull/2335
- https://github.com/rust-lang/miri/pull/4259
- https://github.com/rust-lang/reference/pull/1788
r? `@Kobzol`
|
|
rustdoc book: add argument explanation for `html_playground_url`
Fixes #141414
r? `@GuillaumeGomez`
|
|
document some -Z flags as living in the rustc-dev-guide
i was looking for these but didn't find them at first; add a breadcrumb so people know where to look
|
|
refactor `CanonicalVarKind`
it's unnecessary. I don't believe we'll ever need to store additional info shared by all `CanonicalVarKind`s.
r? `@compiler-errors`
|
|
std: sys: net: uefi: Implement TCP4 connect
- Implement TCP4 connect using EFI_TCP4_PROTOCOL.
- Tested on QEMU setup with connecting to TCP server on host.
|
|
Guarantee behavior of transmuting `Option::<T>::None` subject to NPO
In https://github.com/rust-lang/rust/pull/115333, we added a guarantee that transmuting from `[0u8; N]` to `Option<P>` is sound where `P` is a pointer type subject to the null pointer optimization (NPO). It would be useful to be able to guarantee the inverse - that a `None::<P>` value can be transmutes to an array and that will yield `[0u8; N]`.
Closes #117591
|
|
|
|
Reduce boilerplate in doctests by replacing fallible function calls with
literals.
|
|
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #141405 (GetUserProfileDirectoryW is now documented to always store the size)
- #141427 (Disable `triagebot`'s `glacier` handler)
- #141429 (Dont walk into unsafe binders when emiting error for non-structural type match)
- #141438 (Do not try to confirm non-dyn compatible method)
- #141444 (Improve CONTRIBUTING.md grammar and clarity)
- #141446 (Add 2nd Solaris target maintainer)
- #141456 (Suggest correct `version("..")` predicate syntax in check-cfg)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
|
|
Suggest correct `version("..")` predicate syntax in check-cfg
This PR specialize the `unexpected_cfgs` lint diagnostic to suggest correct `version("..")` predicate syntax when providing the key-value one, eg. `version = "1.27"`.
Fixes https://github.com/rust-lang/rust/issues/141440
r? ``@jieyouxu``
|
|
Add 2nd Solaris target maintainer
Based on concenr here https://github.com/rust-lang/compiler-team/issues/870#issuecomment-2903825327 I propose my coleague ```@kulikjak``` as 2nd Solaris maintainer. He already did some work to Rust in past.
|
|
Improve CONTRIBUTING.md grammar and clarity
slight grammar changes for clarity
|
|
Do not try to confirm non-dyn compatible method
See the comment I left in `compiler/rustc_hir_typeck/src/method/confirm.rs`.
If we have a receiver that does not deref to the `dyn Trait` we're assembling the method from, then we used to ICE, but that's something that is possible to encounter with arbitrary self types.
r? oli-obk
Fixes https://github.com/rust-lang/rust/issues/141419
|
|
compiler-errors:unsafe-binder-non-structural-match, r=spastorino
Dont walk into unsafe binders when emiting error for non-structural type match
Fixes #141422.
The other two binder-having types are also special cased here, unsurprisingly.
r? oli-obk
|
|
Disable `triagebot`'s `glacier` handler
Part of https://github.com/rust-lang/rust/issues/125459.
Unblocks https://github.com/rust-lang/triagebot/pull/2008.
r? Urgau
|
|
GetUserProfileDirectoryW is now documented to always store the size
Update to match https://github.com/MicrosoftDocs/sdk-api/pull/1810
Also fix a bug in the Miri implementation while I am starting at that code...
r? ```@ChrisDenton```
Fixes #141254
|
|
Remove #![feature(let_chains)] from libcore
PR https://github.com/rust-lang/rust/pull/132833 has stabilized the let_chains feature. This PR removes the last occurrence from the library.
Split out of #140966 as it caused breakage. Now we have a patch to the linux tree that fixes the build, so we update the linux tree to it.
cc https://github.com/Rust-for-Linux/linux/issues/1163
cc https://github.com/rust-lang/rust/issues/140722
|
|
|
|
rustdoc: Speed up `TypeAliasPart::get`
Big speedups here on a couple of the benchmarks.
r? `@GuillaumeGomez`
|
|
|
|
|
|
Update cargo
9 commits in 47c911e9e6f6461f90ce19142031fe16876a3b95..68db37499f2de8acef704c73d9031be6fbcbaee4
2025-05-14 17:53:17 +0000 to 2025-05-22 14:27:15 +0000
- chore(gh): Add new-lint issue template (rust-lang/cargo#15575)
- fix(toml): Remove workaround for rustc frontmatter support (rust-lang/cargo#15570)
- fix(vendor)!: vendor files with .rej/.orig suffix (rust-lang/cargo#15569)
- fix(vendor)!: direct extraction for registry sources (rust-lang/cargo#15514)
- chore(deps): update msrv (1 version) to v1.87 (rust-lang/cargo#15530)
- Fix comment for cargo/core/compiler/fingerprint/mod.rs (rust-lang/cargo#15565)
- fix: remove unnecessary workaround in standard_lib test (rust-lang/cargo#15522)
- Allow configuring arbitrary codegen backends (rust-lang/cargo#15562)
- Update dependencies (rust-lang/cargo#15557)
r? ghost
|
|
This is a huge perf win for rustdoc on the `typenum` and `nalgebra`
benchmarks, because the `else` branch doesn't get hit much.
|
|
The comparison against `text` seems to be unnecessary.
|
|
slight grammar changes for clarity
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #138896 (std: fix aliasing bug in UNIX process implementation)
- #140832 (aarch64-linux: Default to FramePointer::NonLeaf)
- #141065 (Updated std doctests for wasm)
- #141369 (Simplify `format_integer_with_underscore_sep`)
- #141374 (make shared_helpers exe function work for both cygwin and non-cygwin hosts)
- #141398 (chore: fix typos in comment)
- #141457 (Update mdbook to 0.4.50)
Failed merges:
- #141405 (GetUserProfileDirectoryW is now documented to always store the size)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Update mdbook to 0.4.50
This updates mdbook to 0.4.50 which brings in several changes, and specifically a fix for syntax highlighting in rust-by-example.
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0450
|