306514 Commits

Author SHA1 Message Date
Matthias Krüger
82e9e54ef3
Rollup merge of #146283 - LorrensP-2158466:resolve-cm-cell, r=petrochenkov
Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.

Introduces wrappers around `Cell` and `RefCell` that only allow mutation when we are not in speculative resolution. This is preparatory work for rust-lang/rust#145108.

It would allow us to make `ImportData` and `ModuleData` sync and send safe.

r? ``@petrochenkov``
2025-09-26 06:36:30 +02:00
bors
b733736ea2 Auto merge of #146919 - lcnr:yeet-fast-path, r=fee1-dead
remove incorrect fast path

Using `tcx.is_copy_modulo_regions` drops information from the current `typing_env`. Writing a regression test for this is really hard. We need to prove `Copy` of something that doesn't directly reference a coroutine or an opaque, but does so indirectly.

cc rust-lang/rust#146813.
2025-09-25 23:50:40 +00:00
bors
7ac0330c6d Auto merge of #147037 - matthiaskrgr:rollup-xtgqzuu, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
 - rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
 - rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
 - rust-lang/rust#142401 (Add proper name mangling for pattern types)
 - rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`)
 - rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes)
 - rust-lang/rust#146924 (Add doc for `NonZero*` const creation)
 - rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 20:35:49 +00:00
bors
eabf390b4c Auto merge of #146697 - cjgillot:invalidate-patch, r=lcnr
Avoid invalidating CFG caches from MirPatch::apply.

Small effort to reduce invalidating CFG caches.
2025-09-25 17:19:29 +00:00
LorrensP-2158466
0374df1b50 Introduce and use CmCell during import resolution. 2025-09-25 18:38:36 +02:00
Matthias Krüger
c6d0059fb8
Rollup merge of #146933 - yotamofek:pr/rustdoc/highlight_no_write_str, r=GuillaumeGomez
Make `render_example_with_highlighting` return an `impl fmt::Display`

Removes some more usages of `write_str`. Shouldn't affect runtime, but makes the codebase a bit more consistent.
Each commit can be reviewed separately
2025-09-25 18:15:11 +02:00
Matthias Krüger
781f71a6fe
Rollup merge of #146924 - cptpiepmatz:doc-nonzero-const-creation, r=joboet
Add doc for `NonZero*` const creation

I ran into trouble using `NonZero*` values because I didn’t see any clear way to create them at compile time. At first I ended up using `NonZero*::new_unchecked` a lot, until I realized that `Option::unwrap` and `Option::expect` are `const` and can be used in a `const` context. With that, you can create non-zero values at compile time safely, without touching `unsafe`. This wasn’t obvious to me and my peers who’ve been using Rust for a while, so I thought adding a note to the docs would make it easier for others to discover.

If this should be worded differently or placed in another location, we can do that. I just want to make this more obvious.
2025-09-25 18:15:10 +02:00
Matthias Krüger
83cf8f9860
Rollup merge of #146859 - cammeresi:btree-alloc-20250920, r=joboet
BTreeMap: Don't leak allocators when initializing nodes

Memory was allocated via `Box::leak` and thence intended to be tracked and deallocated manually, but the allocator was also leaked, not tracked, and never dropped.  Now it is dropped immediately.

According to my reading of the `Allocator` trait, if a copy of the allocator remains live, then its allocations must remain live.  Since the B-tree has a copy of the allocator that will only be dropped after the nodes, it's safe to not store the allocator in each node (which would be a much more intrusive change).

Fixes: rust-lang/rust#106203
2025-09-25 18:15:09 +02:00
Matthias Krüger
fea9196e52
Rollup merge of #146293 - BenjaminBrienen:try_remove, r=joboet
feat: non-panicking `Vec::try_remove`

`if index < my_vector.len() { Some(my_vector.remove(index)) } else { None }` is annoying to write and non-panicking functions are broadly useful.

APC: https://github.com/rust-lang/libs-team/issues/649

Tracking issue: https://github.com/rust-lang/rust/issues/146954
2025-09-25 18:15:09 +02:00
Matthias Krüger
958d1438b6
Rollup merge of #142401 - oli-obk:pattern-mango, r=petrochenkov
Add proper name mangling for pattern types

requires adding demangler support first https://github.com/rust-lang/rustc-demangle/pull/81

needed for https://github.com/rust-lang/rust/pull/136006#discussion_r2139792593 as otherwise we will have symbol collisions
2025-09-25 18:15:08 +02:00
Matthias Krüger
e3f7626732
Rollup merge of #141032 - petrosagg:extract-if-ub, r=joboet
avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`

The implementation of the `Vec::extract_if` iterator violates the safety contract adverized by `slice::from_raw_parts` by always constructing a mutable slice for the entire length of the vector even though that span of memory can contain holes from items already drained. The safety contract of `slice::from_raw_parts` requires that all elements must be properly
initialized.

As an example we can look at the following code:

```rust
let mut v = vec![Box::new(0u64), Box::new(1u64)];
for item in v.extract_if(.., |x| **x == 0) {
    drop(item);
}
```

In the second iteration a `&mut [Box<u64>]` slice of length 2 will be constructed. The first slot of the slice contains the bitpattern of an already deallocated box, which is invalid.

This fixes the issue by only creating references to valid items and using pointer manipulation for the rest. I have also taken the liberty to remove the big `unsafe` blocks in place of targetted ones with a SAFETY comment. The approach closely mirrors the implementation of `Vec::retain_mut`.

**Note to reviewers:** The diff is easier to follow with whitespace hidden.
2025-09-25 18:15:07 +02:00
Matthias Krüger
a028b7a9e3
Rollup merge of #135771 - GuillaumeGomez:jump-to-def-perf, r=fmease
[rustdoc] Add support for associated items in "jump to def" feature

Fixes https://github.com/rust-lang/rust/issues/135485.

r? ``@fmease``
2025-09-25 18:15:06 +02:00
Matthias Krüger
a39d5134cd
Rollup merge of #116882 - fmease:rustdoc-generalized-priv-repr-heuristic, r=rustdoc
rustdoc: hide `#[repr]` if it isn't part of the public ABI

> [!IMPORTANT]
> Temporarily stacked on top of PR https://github.com/rust-lang/rust/pull/146527; only the last commit is relevant!

Follow-up to rust-lang/rust#115439.
Unblocks rust-lang/rust#116743, CC ``@dtolnay.``

Fixes rust-lang/rust#66401.
Fixes rust-lang/rust#128364.
Fixes rust-lang/rust#137440.

Only display the representation `#[repr(REPR)]` (where `REPR` is not `Rust` or `transparent`) of a given type if none of its variants (incl. the synthetic variants of structs) are `#[doc(hidden)]` and all of its fields are public and not `#[doc(hidden)]` since it's likely not meant to be considered part of the public ABI otherwise.

`--document-{private,hidden}-items` works as expected in this context, too.

Moreover, we now also factor in the presence of `#[doc(hidden)]` when checking whether to show `repr(transparent)` or not.
2025-09-25 18:15:06 +02:00
Tim 'Piepmatz' Hesse
185ae698aa add doc for NonZero* const creation 2025-09-25 17:52:24 +02:00
bors
6f34f4ee07 Auto merge of #147019 - Zalathar:rollup-boxzbmo, r=Zalathar
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#145067 (RawVecInner: add missing `unsafe` to unsafe fns)
 - rust-lang/rust#145277 (Do not materialise X in [X; 0] when X is unsizing a const)
 - rust-lang/rust#145973 (Add `std` support for `armv7a-vex-v5`)
 - rust-lang/rust#146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization)
 - rust-lang/rust#146735 (unstably constify float mul_add methods)
 - rust-lang/rust#146737 (f16_f128: enable some more tests in Miri)
 - rust-lang/rust#146766 (Add attributes for #[global_allocator] functions)
 - rust-lang/rust#146905 (llvm: update remarks support on LLVM 22)
 - rust-lang/rust#146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`)
 - rust-lang/rust#147005 (Small string formatting cleanup)
 - rust-lang/rust#147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`)
 - rust-lang/rust#147008 (bootstrap.py: Respect build.jobs while building bootstrap tool)
 - rust-lang/rust#147013 (rustdoc: Fix documentation for `--doctest-build-arg`)
 - rust-lang/rust#147015 (Use `LLVMDisposeTargetMachine`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 14:03:21 +00:00
Stuart Cook
59866ef305
Rollup merge of #147015 - Zalathar:dispose-tm, r=lqd
Use `LLVMDisposeTargetMachine`

After bumping the minimum LLVM version to 20 (rust-lang/rust#145071), we no longer need to run any custom code when disposing of a TargetMachine, so we can just use the upstream LLVM-C function.
2025-09-25 20:32:00 +10:00
Stuart Cook
a6325412f8
Rollup merge of #147013 - fmease:fix-docs-doctest-build-arg, r=GuillaumeGomez
rustdoc: Fix documentation for `--doctest-build-arg`

In https://github.com/rust-lang/rust/pull/139863, I forgot to update the documentation.

Tracking issue: https://github.com/rust-lang/rust/issues/134172
2025-09-25 20:32:00 +10:00
Stuart Cook
fe4cceb73d
Rollup merge of #147008 - neuschaefer:bootstrap-jobs, r=Kobzol
bootstrap.py: Respect build.jobs while building bootstrap tool

On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
2025-09-25 20:31:59 +10:00
Stuart Cook
3053a18ec9
Rollup merge of #147007 - LawnGnome:tosocketaddrs-doc, r=tgross35
Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`

Although the examples below this list do imply that there's an impl of `ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list of default implementations.
2025-09-25 20:31:58 +10:00
Stuart Cook
62aa0ae29f
Rollup merge of #147005 - GuillaumeGomez:string-formatting-cleanup, r=jdonszelmann
Small string formatting cleanup

This PR is mostly useless. I was going through this file, saw that and corrected it. That's pretty much it. Feel free to close it if it's a bother.
2025-09-25 20:31:58 +10:00
Stuart Cook
231002f0c2
Rollup merge of #146982 - fmease:fix-rmake-linker-warning, r=bjorn3
Remove erroneous normalization step in `tests/run-make/linker-warning`

Fixes rust-lang/rust#146977.

r? bjorn3 or reassign
2025-09-25 20:31:57 +10:00
Stuart Cook
2565b27cc0
Rollup merge of #146905 - durin42:llvm-22-bitstream-remarks, r=nikic
llvm: update remarks support on LLVM 22

LLVM change dfbd76bda01e removed separate remark support entirely, but
it turns out we can just drop the parameter and everything appears to
work fine.

Fixes rust-lang/rust#146912 as far as I can tell (the test passes.)
2025-09-25 20:31:56 +10:00
Stuart Cook
46e25aa7a3
Rollup merge of #146766 - nikic:global-alloc-attr, r=nnethercote
Add attributes for #[global_allocator] functions

Emit `#[rustc_allocator]` etc. attributes on the functions generated by the `#[global_allocator]` macro, which will emit LLVM attributes like `"alloc-family"`. If the module with the global allocator participates in LTO, this ensures that the attributes typically emitted on the allocator declarations are not lost if the definition is imported.

There is a similar issue when the allocator shim is used, but I've opted not to fix that case in this PR, because doing that cleanly is somewhat gnarly.

Related to https://github.com/rust-lang/rust/issues/145995.
2025-09-25 20:31:56 +10:00
Stuart Cook
cec668fefc
Rollup merge of #146737 - RalfJung:f16-f128-miri, r=tgross35
f16_f128: enable some more tests in Miri

For some reason, a bunch of tests were disabled in Miri that don't use any fancy intrinsics. Let's enable them.

I verified this with `./x miri library/core --no-doc -- float`.

r? `@tgross35`
2025-09-25 20:31:55 +10:00
Stuart Cook
8e62f95376
Rollup merge of #146735 - Qelxiros:const_mul_add, r=tgross35,RalfJung
unstably constify float mul_add methods

Tracking issue: rust-lang/rust#146724
r? `@tgross35`
2025-09-25 20:31:54 +10:00
Stuart Cook
fab06469ee
Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJung
Add an attribute to check the number of lanes in a SIMD vector after monomorphization

Allows std::simd to drop the `LaneCount<N>: SupportedLaneCount` trait and maintain good error messages.

Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs.

r? ``@RalfJung``

cc ``@workingjubilee`` ``@programmerjake``
2025-09-25 20:31:53 +10:00
Stuart Cook
0a34928ad8
Rollup merge of #145973 - vexide:vex-std, r=tgross35
Add `std` support for `armv7a-vex-v5`

This PR adds standard library support for the VEX V5 Brain (`armv7a-vex-v5` target). It is more-or-less an updated version of the library-side work done in rust-lang/rust#131530.

This was a joint effort between me, `@lewisfm,` `@max-niederman,` `@Gavin-Niederman` and several other members of the [`vexide` project](https://github.com/vexide/).

## Background

VEXos is a fairly unconventional operating system, with user code running in a restricted enviornment with regards to I/O capabilities and whatnot. As such, several OS-dependent APIs are unsupported or have partial support (such as `std::net`, `std::process`, and most of `std::thread`). A more comprehensive list of what does or doesn't work is outlined in the [updated target documentation](https://github.com/vexide/rust/blob/vex-std/src/doc/rustc/src/platform-support/armv7a-vex-v5.md). Despite these limitations, we believe that `libstd` support on this target still has value to users, especially given the popular use of this hardware for educational purposes. For some previous discussion on this matter, see [this comment](https://github.com/rust-lang/rust/pull/131530#issuecomment-2432856841).

## SDK Linkage

VEXos doesn't really ship with an official `libc` or POSIX-style platform API (and though it does port newlib, these are stubbed on top of the underlying SDK). Instead, VEX provides their own SDK for calling platform APIs. Their official SDK is kept proprietary (with public headers), though open-source implementations exist. Following the precedent of the `armv6k-nintendo-3ds` team's work in rust-lang/rust#95897, we've opted not to directly link `libstd` to any SDK with the expectation that users will provide their own with one of the following options:
-  [`vex-sdk-download`](https://github.com/vexide/vex-sdk/tree/main/packages/vex-sdk-download), which downloads an official proprietary SDK from VEX using a build script.
- [`vex-sdk-jumptable`](https://crates.io/crates/vex-sdk-jumptable), which is a compatible, open-source reimplementation of the SDK using firmware jumps.
- [`vex-sdk-pros`](https://github.com/vexide/vex-sdk/tree/main/packages/vex-sdk-pros), which uses the [PROS kernel](https://github.com/purduesigbots/pros) as a provider for SDK functions.
- Linking their own implementation or stubbing the functions required by libstd.

 The `vex-sdk` crate used in the VEXos PAL provides `libc`-style FFI bindings for any compatible system library, so any of these options *should* work fine. A functional demo project using `vex-sdk-download` can be found [here](https://github.com/vexide/armv7a-vex-v5-demo/tree/main).

## Future Work

This PR implements virtually everything we are currently able to implement given the current capabilities of the platform. The exception to this is file directory enumeration, though the implementation of that is sufficiently [gross enough](c6c5bad11e/packages/vexide-core/src/fs/mod.rs (L987)) to drive us away from supporting this officially.

Additionally, I have a working branch implementing the `panic_unwind` runtime for this target, which is something that would be nice to see in the future, though given the volume of compiler changes i've deemed it out-of-scope for this PR.
2025-09-25 20:31:53 +10:00
Stuart Cook
21b0e12e01
Rollup merge of #145277 - dingxiangfei2009:fold-coercion-into-const, r=nnethercote
Do not materialise X in [X; 0] when X is unsizing a const

Fix rust-lang/rust#143671

It turns out that MIR builder materialise `X` in `[X; 0]` into a temporary local when `X` is unsizing a `const`. This led to a confusing call to destructor of `X` when such a destructor is declared. [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=8dfc933af89efeb89c881bc77498ba63)

This patch may miss out other cases that we should avoid materialisation in case of `[X; 0]`. Suggestions to include is most welcome!
2025-09-25 20:31:52 +10:00
Stuart Cook
2acd80cfa9
Rollup merge of #145067 - btj:patch-3, r=tgross35
RawVecInner: add missing `unsafe` to unsafe fns

Some (module-private) functions in `library/alloc/src/raw_vec/mod.rs` are unsafe (i.e. may cause UB when called from safe code) but are not marked `unsafe`. Specifically:
- `RawVecInner::grow_exact` causes UB if called with `len` and `additional` arguments such that `len + additional` is less than the current capacity. Indeed, in that case it calls [Allocator::grow](https://doc.rust-lang.org/std/alloc/trait.Allocator.html#method.grow) with a `new_layout` that is smaller than `old_layout`, which violates a safety precondition.
- The RawVecInner methods for resizing the buffer cause UB if called with an `elem_layout` different from the one used to initially allocate the buffer, because in that case `Allocator::grow` or `Allocator::shrink` are called with an `old_layout` that does not *fit* the allocated block, which violates a safety precondition.
- `RawVecInner::current_memory` might cause UB if called with an `elem_layout` different from the one used to initially allocate the buffer, because the `unchecked_mul` might overflow.
- Furthermore, these methods cause UB if called with an `elem_layout` where the size is not a multiple of the alignment. This is because `Layout::repeat` is used (in `layout_array`) to compute the allocation's layout when allocating, which includes padding to ensure alignment of array elements, but simple multiplication is used (in `current_memory`) to compute the old allocation's layout when resizing or deallocating, which would cause the layout used to resize or deallocate to not *fit* the allocated block, which violates a safety precondition.

I discovered these issues while performing formal verification of `library/alloc/src/raw_vec/mod.rs` per [Challenge 19](https://model-checking.github.io/verify-rust-std/challenges/0019-rawvec.html) of the [AWS Rust Standard Library Verification Contest](https://aws.amazon.com/blogs/opensource/verify-the-safety-of-the-rust-standard-library/).
2025-09-25 20:31:51 +10:00
bors
7cfd7d328b Auto merge of #147003 - matthiaskrgr:rollup-b5z9uiz, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#146556 (Fix duration_since panic on unix when std is built with integer overflow checks)
 - rust-lang/rust#146679 (Clarify Display for error should not include source)
 - rust-lang/rust#146753 (Improve the pretty print of UnstableFeature clause)
 - rust-lang/rust#146894 (Improve derive suggestion of const param)
 - rust-lang/rust#146950 (core: simplify `CStr::default()`)
 - rust-lang/rust#146958 (Fix infinite recursion in Path::eq with String)
 - rust-lang/rust#146971 (fix ICE in writeback due to bound regions)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 10:30:50 +00:00
J. Neuschäfer
747019ce46 bootstrap.py: Respect build.jobs while building bootstrap tool
On resource-constrained systems, it is vital to respect the value of
build.jobs, in order to avoid overwhelming the available memory.
2025-09-25 12:08:58 +02:00
León Orell Valerian Liehr
85c193a4ed
rustdoc: hide #[repr(...)] if it isn't part of the public ABI 2025-09-25 11:49:27 +02:00
León Orell Valerian Liehr
d7d7725b8c
rustdoc: Fully escape link section and export name
Escape "special characters" (e.g., double quotes `"` and line breaks `\n`).
Escape HTML.

Lastly, add regression tests and clean up existing tests.
2025-09-25 11:30:58 +02:00
León Orell Valerian Liehr
88e797784e
rustdoc: Slightly clean up attr rendering 2025-09-25 10:16:52 +02:00
Zalathar
85018f09f6 Use LLVMDisposeTargetMachine 2025-09-25 18:10:55 +10:00
León Orell Valerian Liehr
932f3a8ecd
rustdoc: Fix documentation for --doctest-build-arg 2025-09-25 09:29:10 +02:00
bors
bbcbc7818b Auto merge of #146981 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

17 commits in 966f94733bbc94ca51ff9f1e4c49ad250ebbdc50..f2932725b045d361ff5f18ba02b1409dd1f44e71
2025-09-16 17:24:45 +0000 to 2025-09-24 11:31:26 +0000
- fix: use `host-tuple` for host target subsitution (rust-lang/cargo#16003)
- test(build-std): move away from panic_immediate_abort  (rust-lang/cargo#16006)
- fix: Sparse URLs in `TomlLockfileSourceId` (rust-lang/cargo#15990)
- refactor(gctx): extract toml dotted keys validation (rust-lang/cargo#15998)
- feat: Add lint for global use of `hint-mostly-unused` (rust-lang/cargo#15995)
- Make GlobalContext Sync (rust-lang/cargo#15967)
- chore(deps): update cargo-semver-checks to v0.44.0 (rust-lang/cargo#15993)
- fix(frontatter): Only allow horizontal whitespace after fences (rust-lang/cargo#15975)
- docs: Add Lockfile schemas docs (rust-lang/cargo#15989)
- Add parallel frontend to the build performance guide (rust-lang/cargo#15970)
- chore(deps): update msrv (3 versions) to v1.88 (rust-lang/cargo#15988)
- chore(deps): update msrv (1 version) to v1.90 (rust-lang/cargo#15984)
- feat(cargo-util-schemas): Move lockfile schemas (rust-lang/cargo#15980)
- Clarify multiple version requirement behavior (rust-lang/cargo#15979)
- Adds ghostty as supported terminal for term integration (OSC 9;4) (rust-lang/cargo#15977)
- docs(team): Fixed broken office hours link (rust-lang/cargo#15976)
- docs: Clarify git sources vs git registries in source replacement documentation (rust-lang/cargo#15974)

r? ghost
2025-09-25 07:25:03 +00:00
León Orell Valerian Liehr
bc37dd4a72
Remove an erroneous normalization step in tests/run-make/linker-warning 2025-09-25 06:30:19 +02:00
Sidney Cammeresi
137d4eaf12
BTreeMap: Don't leak allocators when initializing nodes
Memory was allocated via `Box::leak` and thence intended to be tracked
and deallocated manually, but the allocator was also leaked, not
tracked, and never dropped.  Now it is dropped immediately.

According to my reading of the `Allocator` trait, if a copy of the
allocator remains live, then its allocations must remain live.  Since
the B-tree has a copy of the allocator that will only be dropped after
the nodes, it's safe to not store the allocator in each node (which
would be a much more intrusive change).
2025-09-24 18:08:32 -07:00
Josh Stone
fe440ec934 llvm: add a destructor to call releaseSerializer 2025-09-24 16:53:17 -07:00
Adam Harvey
852da23a2d
Explicitly note &[SocketAddr] impl of ToSocketAddrs.
Although the examples below this list do imply that there's an impl of
`ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list
of default implementations.
2025-09-24 15:56:38 -07:00
Guillaume Gomez
aa75d34035 Small string formatting cleanup 2025-09-24 23:47:13 +02:00
Matthias Krüger
57ee169ff2
Rollup merge of #146971 - lcnr:fix-writeback, r=BoxyUwU
fix ICE in writeback due to bound regions

fixes rust-lang/rust#117808

r? `@BoxyUwU`
2025-09-24 23:33:29 +02:00
Matthias Krüger
d10d6bfb02
Rollup merge of #146958 - el-ev:fix_path_string_eq_recurse, r=joboet
Fix infinite recursion in Path::eq with String

- Closes [after beta backport] rust-lang/rust#146940
2025-09-24 23:33:28 +02:00
Matthias Krüger
6618ac7bb1
Rollup merge of #146950 - joboet:cstr_default, r=tgross35
core: simplify `CStr::default()`

Just use a `CStr`-literal...
2025-09-24 23:33:27 +02:00
Matthias Krüger
6351a63486
Rollup merge of #146894 - tiif:suggest_feature_attr, r=BoxyUwU
Improve derive suggestion of const param

Make the suggestion not to remove the adt and use the name of the adt variant in the diagnostic.

r? `@BoxyUwU`
2025-09-24 23:33:27 +02:00
Matthias Krüger
7a4ac48345
Rollup merge of #146753 - tiif:unsatisfiable-unstable-feature, r=BoxyUwU
Improve the pretty print of UnstableFeature clause

As per https://github.com/rust-lang/rust/pull/145095#discussion_r2349439492, we could make the diagnostic for unsatisfiable ``UnstableFeature`` clause better.

r? `@BoxyUwU`
2025-09-24 23:33:26 +02:00
Matthias Krüger
0ab93860ed
Rollup merge of #146679 - stepancheg:error-display-source, r=dtolnay
Clarify Display for error should not include source

Fixes rust-lang/rust#145561.

r? `@Noratrieb`
2025-09-24 23:33:25 +02:00
Matthias Krüger
8073b6f169
Rollup merge of #146556 - stepancheg:repro-146228, r=tgross35
Fix duration_since panic on unix when std is built with integer overflow checks

Add a test for regression rust-lang/rust#146228, and turns out this test fails detects error when std is compiled with integer overflow checks.

Original regression was reverted in rust-lang/rust#146473.

First attempt to fix was in rust-lang/rust#146247; test and some code is copied from there, thanks `@eval-exec`

r? `@RalfJung`
2025-09-24 23:33:25 +02:00
Stepan Koltsov
92859e98ee Repro duration_since regression from issue 146228 2025-09-24 21:07:26 +01:00