Commit Graph

304366 Commits

Author SHA1 Message Date
Stuart Cook
eda6dc9283 Rollup merge of #144651 - connortsui20:nonpoison_condvar, r=joboet
Implementation: `#[feature(nonpoison_condvar)]`

Tracking Issue: https://github.com/rust-lang/rust/issues/134645

This PR continues the effort made in https://github.com/rust-lang/rust/pull/144022 by adding the implementation of `nonpoison::condvar`.

Many of the changes here are similar to the changes made to implement `nonpoison::mutex`.

There are two other changes here. The first is that the `Barrier` implementation is migrated to use the `nonpoison::Condvar` instead of the `poison` variant. The second (which might be subject to some discussion) is that `WaitTimeoutResult` is moved up to `mod.rs`, as both `condvar` variants need that type (and I do not know if there is a better place to put it now).

### Related PRs

- `nonpoison_rwlock` implementation: https://github.com/rust-lang/rust/pull/144648
- `nonpoison_once` implementation: https://github.com/rust-lang/rust/pull/144653
2025-08-30 20:29:06 +10:00
Stuart Cook
6421031e57 Rollup merge of #143462 - Rudxain:read_to_string_usize, r=joboet
fix(lib-std-fs): handle `usize` overflow in `read*`

I assume this is a non-breaking change, as there would be an OOM `panic` anyways. This patch ensures a fast-fail when there's not enough memory to load the file. This only changes behavior on platforms where `usize` is smaller than 64bits
2025-08-30 20:29:05 +10:00
bors
b53c72ffaa Auto merge of #144494 - scottmcm:min_bigint_helpers, r=Mark-Simulacrum
Partial-stabilize the basics from `bigint_helper_methods`

Direct link to p-FCP comment: https://github.com/rust-lang/rust/pull/144494#issuecomment-3133172161

After libs-api discussion, this is now the following methods:

- [`uN::carrying_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_add): uN + uN + bool -> (uN, bool)
- [`uN::borrowing_sub`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.borrowing_sub): uN + uN + bool -> (uN, bool)
- [`uN::carrying_mul`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_mul): uN * uN + uN -> (uN, uN)
- [`uN::carrying_mul_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_mul_add): uN * uN + uN + uN -> (uN, uN)

Specifically, these are the ones that are specifically about working with `uN` as a "digit" (or "limb") where the output, despite being larger than can fit in a single digit, wants to be phrased in terms of those *digits*, not in terms of a wider type.

(This leaves open the possibility of things like `widening_mul: u32 * u32 -> u64` for places where one wants to only think in terms of the *number*s, rather than as carries between multiple digits.  Though of course discussions about how best to phrase such a thing are best for the tracking issue, not for this PR.)

---

**Original PR description**:

A [conversation on IRLO](https://internals.rust-lang.org/t/methods-for-splitting-integers-into-their-halves/23210/7?u=scottmcm) the other day pushed me to write this up 🙂

This PR proposes a partial stabilization of `bigint_helper_methods` (rust-lang/rust#85532), focusing on a basic set that hopefully can be non-controversial.  Specifically:

- [`uN::carrying_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_add): uN + uN + bool -> (uN, bool)
- [`uN::widening_mul`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.widening_mul): uN * uN -> (uN, uN)
- [`uN::carrying_mul_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_mul_add): uN * uN + uN + uN -> (uN, uN)

Why these?

- We should let people write Rust without needing to be backend experts to know what the magic incantation is to do this.  Even `carrying_add`, which doesn't seem that complicated, actually broke in 1.82 (see rust-lang/rust#133674) so we should just offer something fit-for-purpose rather than making people keep up with whatever the secret sauce is today.  We also get to do things that users cannot, like have the LLVM version emit operations on `i256` in the implementation of `u128::carrying_mul_add` (https://rust.godbolt.org/z/cjG7eKcxd).
- Unsigned only because the behaviour is much clearer than when signed is involved, as everything is just unsigned (vs questions like whether `iN * iN` should give `(uN, iN)`) and carries can only happen in one direction (vs questions about whether the carry from `-128_u8 + -128_u8` should be considered `-1`).
- `carrying_add` is the core [full adder](https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder) primitive for implementing addition.
- `carrying_mul_add` is the core primitive for [grade school](https://en.wikipedia.org/wiki/Multiplication_algorithm#Long_multiplication) multiplication (see the example in its docs for why both carries are needed).
- `widening_mul` even though it's not strictly needed (its implementation is just `carrying_mul_add(a, b, 0, 0)` right now) as the simplest way for users to get to [cranelift's `umulhi`](https://docs.rs/cranelift/latest/cranelift/prelude/trait.InstBuilder.html#method.umulhi), RISC-V's `MULHU`, Arm's `UMULL`, etc.  (For example, I added an ISLE pattern d12e4237de (diff-2041f67049d5ac3d8f62ea91d3cb45cdb8608d5f5cdab988731ae2addf90ef01) so Cranelift can notice what's happening from the fallback, even if the intrinsics aren't overridden specifically.  And on x86 this is one of the simplest possible non-trivial functions <https://rust.godbolt.org/z/4oadWKTc1> because `MUL` puts the results in exactly the registers that the scalar pair result happens to want.)

(I did not const-stabilize them in this PR because [the fallbacks](https://github.com/rust-lang/rust/blob/master/library/core/src/intrinsics/fallback.rs) are using `#[const_trait]` plus there's two [new intrinsic](https://doc.rust-lang.org/nightly/std/intrinsics/fn.disjoint_bitor.html)s involved, so I didn't want to *also* open those cans of worms here.  Given that both intrinsics *have* fallbacks, and thus don't do anything that can't already be expressed in existing Rust, const-stabilizing these should be straight-forward once the underlying machinery is allowed on stable.  But that doesn't need to keep these from being usable at runtime in the mean time.)
2025-08-30 04:14:07 +00:00
bors
e004014d1b Auto merge of #146023 - tgross35:rollup-gbec538, r=tgross35
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#145242 (std: use a TAIT to define `SplitPaths` on UNIX)
 - rust-lang/rust#145467 (Stabilize `strict_provenance_atomic_ptr` feature)
 - rust-lang/rust#145756 (str: Stabilize `round_char_boundary` feature)
 - rust-lang/rust#145967 (compiler: Include span of too huge enum with `-Cdebuginfo=2`)
 - rust-lang/rust#145990 (`AutoDeref::final_ty` is already resolved)
 - rust-lang/rust#145991 (std: haiku: fix `B_FIND_PATH_IMAGE_PATH`)
 - rust-lang/rust#146000 (Improve librustdoc error when a file creation/modification failed)
 - rust-lang/rust#146017 (Mark pipe2 supported in Android)
 - rust-lang/rust#146022 (compiler-builtins subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-30 01:06:25 +00:00
Trevor Gross
319d5547da Rollup merge of #146022 - tgross35:update-builtins, r=tgross35
compiler-builtins subtree update

Subtree update of `compiler-builtins` to ac3a4cd846.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-08-29 19:33:06 -05:00
Trevor Gross
98806c8fdc Rollup merge of #146017 - maurer:pipe2, r=Mark-Simulacrum
Mark pipe2 supported in Android

Android has supported pipe2 since 2010, long before the current min SDK.
2025-08-29 19:33:05 -05:00
Trevor Gross
b722da955f Rollup merge of #146000 - GuillaumeGomez:rustdoc-error-improvement, r=notriddle
Improve librustdoc error when a file creation/modification failed

The message before looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/"
```

And with this change it looks like this:

```
failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8
```

r? ``````@lolbinarycat``````
2025-08-29 19:33:05 -05:00
Trevor Gross
a7fd14f89d Rollup merge of #145991 - GrigorenkoPV:haiku, r=tgross35
std: haiku: fix `B_FIND_PATH_IMAGE_PATH`

Fixes https://github.com/rust-lang/rust/issues/145952, which was caused by https://github.com/rust-lang/libc/pull/4575

```````@rustbot``````` label T-libs O-haiku
2025-08-29 19:33:04 -05:00
Trevor Gross
4d5ca4cd38 Rollup merge of #145990 - lcnr:final-ty-no-resolve, r=davidtwco
`AutoDeref::final_ty` is already resolved

What is a `bool` argument doing here :<

The initial value is already resolved 41f2b6b39e/compiler/rustc_hir_analysis/src/autoderef.rs (L130)

For `builtin_deref` we assert that this is still the case 41f2b6b39e/compiler/rustc_hir_analysis/src/autoderef.rs (L82)

While `overloaded_deref_ty` also resolves at the end 41f2b6b39e/compiler/rustc_hir_analysis/src/autoderef.rs (L173)
2025-08-29 19:33:04 -05:00
Trevor Gross
65a846ad8a Rollup merge of #145967 - Enselic:big-enum-debuginfo-span, r=wesleywiser
compiler: Include span of too huge enum with `-Cdebuginfo=2`

We have the ui test `tests/ui/limits/huge-enum.rs` to ensure we emit an error if we encounter too big enums. Before this fix, compiling the test with `-Cdebuginfo=2` would not include the span of the instantiation site, because the error is then emitted from a different code path that does not include the span.

Propagate the span to the error also in the debuginfo case, so the test passes regardless of debuginfo level. I'm sure we can propagate spans in more places, but let's start small.

## Test failure without the fix

Here is what the failure looks like if you run the test without the fix:

```
[ui] tests/ui/limits/huge-enum.rs#full-debuginfo ... F
.

failures:

---- [ui] tests/ui/limits/huge-enum.rs#full-debuginfo stdout ----
Saved the actual stderr to `/home/martin/src/rust/build/x86_64-unknown-linux-gnu/test/ui/limits/huge-enum.full-debuginfo/huge-enum.full-debuginfo.stderr`
diff of stderr:

1       error: values of the type `Option<TYPE>` are too big for the target architecture
-         --> $DIR/huge-enum.rs:17:9
-          |
-       LL |     let big: BIG = None;
-          |         ^^^
6
7       error: aborting due to 1 previous error
8

The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args limits/huge-enum.rs`
```

as can be seen, the `span` used to be missing with `debuginfo=2`.

## See also

This is one small step towards resolving rust-lang/rust#61117.

cc https://github.com/rust-lang/rust/pull/144499 which began running UI tests with `rust.debuginfo-level-tests=1`. This PR is part of preparing for increasing that to debuglevel 2.
2025-08-29 19:33:03 -05:00
Trevor Gross
751a9ad2e2 Rollup merge of #145756 - okaneco:stabilize_char_boundary, r=scottmcm
str: Stabilize `round_char_boundary` feature

Closes https://github.com/rust-lang/rust/issues/93743
FCP completed https://github.com/rust-lang/rust/issues/93743#issuecomment-3168382171
2025-08-29 19:33:03 -05:00
Trevor Gross
ed9e767c01 Rollup merge of #145467 - Kivooeo:stabilize-strict_provenance_atomic_ptr, r=scottmcm
Stabilize `strict_provenance_atomic_ptr` feature

This closes [tracking issue](https://github.com/rust-lang/rust/issues/99108) and stabilises `AtomicPtr::{fetch_ptr_add, fetch_ptr_sub, fetch_byte_add, fetch_byte_sub, fetch_or, fetch_and, fetch_xor}`

---

EDIT: FCP completed at https://github.com/rust-lang/rust/issues/99108#issuecomment-3168260347
2025-08-29 19:33:02 -05:00
Trevor Gross
19ae97622f Rollup merge of #145242 - joboet:tait-split-paths, r=Mark-Simulacrum
std: use a TAIT to define `SplitPaths` on UNIX

Defining `SplitPaths` as a TAIT allows using closures instead of function pointers for `split` and `map`.
2025-08-29 19:33:02 -05:00
bors
fe55364329 Auto merge of #145997 - matthiaskrgr:rollup-tsgylre, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#145675 (Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [rust-lang/rust#1 of Batch rust-lang/rust#2])
 - rust-lang/rust#145676 (Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [rust-lang/rust#2 of Batch rust-lang/rust#2])
 - rust-lang/rust#145982 (compiletest: Reduce the number of `println!` calls that don't have access to `TestCx`)
 - rust-lang/rust#145984 (`TokenStream` cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-29 16:21:11 +00:00
Guillaume Gomez
638a52c789 Improve librustdoc error when a file creation/modification failed 2025-08-29 16:26:23 +02:00
joboet
85cefabfcd std: use a TAIT to define SplitPaths on UNIX 2025-08-29 16:10:10 +02:00
bors
db3fd4708c Auto merge of #145902 - Kobzol:dist-docs-build-compiler, r=jieyouxu
Avoid more rustc rebuilds in cross-compilation scenarios

This is a continuation of https://github.com/rust-lang/rust/pull/145874.

It adds a `compiler_for_std` function, which is a slimmed down version of `compiler_for`, which is much simpler, and designed to be used only for the standard library.

The build, dist and doc steps somtimes work with a stage2 std for a given target. That currently requires building a stage2 host compiler. However, if we uplift the stage1 libstd anyway, that is wasteful, in particular when we are cross-compiling.

The last two commits progressively make the stage 2 host rustc build avoidance more and more aggressive. I think that if we decide that it is fine to ship stage1 libstd everywhere, then it makes sense to go all the way.

When we ship stuff, we always build it with the stage 1 compiler (e.g. we ship stage 2 rustc which is built with stage 1 rustc). Libstd is the only component where stage N is built with the stage N compiler. So I think that shipping stage 1 libstd is "enough", and we could thus optimize what gets built on CI.

r? `@jieyouxu`
2025-08-29 13:13:53 +00:00
Matthias Krüger
197cb260e4 Rollup merge of #145984 - nnethercote:TokenStream-cleanups, r=chenyukang
`TokenStream` cleanups

r? `@chenyukang`
2025-08-29 12:37:32 +02:00
Matthias Krüger
25163e8151 Rollup merge of #145982 - Zalathar:logv, r=jieyouxu
compiletest: Reduce the number of `println!` calls that don't have access to `TestCx`

In order to stop using `#![feature(internal_output_capture)]` in compiletest, we need to be able to capture the console output of individual tests run by the executor.

The approach I have planned is to have all test runners print “console” output into a trait object that is passed around as part of `TestCx`, since almost all test-runner code has easy access to that context. So `println!("foo")` will become `writeln!(self.stdout, "foo")`, and so on.

In order to make that viable, we need to avoid unnecessary printing in places that don't have easy access to `TestCx`. To do so, we can either get rid of unnecessary print statements, or rearrange the code to make the context available. This PR uses both approaches.

r? jieyouxu
2025-08-29 12:37:31 +02:00
Matthias Krüger
47f1df5ca3 Rollup merge of #145676 - Oneirical:uncountable-integer-9, r=jieyouxu
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#2 of Batch #2]

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
2025-08-29 12:37:30 +02:00
Matthias Krüger
e15744e7a4 Rollup merge of #145675 - Oneirical:uncountable-integer-8, r=jieyouxu
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#1 of Batch #2]

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
2025-08-29 12:37:30 +02:00
Pavel Grigorenko
e3f1e94be7 std: haiku: fix B_FIND_PATH_IMAGE_PATH 2025-08-29 12:14:17 +03:00
lcnr
6fd0e50ecf autoderef final ty is already resolved 2025-08-29 10:53:39 +02:00
Nicholas Nethercote
364a3be579 Put TokenStream stuff in a sensible order.
I.e. the type definition, then a single inherent `impl` block, then the
trait `impl` blocks.

The lack of sensible ordering here has bugged me for some time.
2025-08-29 14:27:20 +10:00
Nicholas Nethercote
16b5ac111c Remove very outdated comment about token streams.
They're now just an `Arc<Vec<TokenTree>>`. No ropes, no views, nothing
like that.
2025-08-29 14:27:18 +10:00
bors
41f2b6b39e Auto merge of #145978 - Zalathar:rollup-0dzk72g, r=Zalathar
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143713 (Add a mailmap entry for gnzlbg)
 - rust-lang/rust#144275 (implement Sum and Product for Saturating(u*))
 - rust-lang/rust#144354 (fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0)
 - rust-lang/rust#145387 (Remove TmpLayout in layout_of_enum)
 - rust-lang/rust#145793 (std library: use execinfo library also on NetBSD.)
 - rust-lang/rust#145884 (Test `instrument-mcount` codegen)
 - rust-lang/rust#145947 (Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml`)
 - rust-lang/rust#145972 (fix `core::marker::Destruct` doc)
 - rust-lang/rust#145977 (tests: Ignore basic-stepping.rs on riscv64)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-29 03:40:14 +00:00
Zalathar
6340b97768 Don't print captures in TestCx::normalize_platform_differences
This appears to have been leftover debugging code.

If the capture information turns out to have still been useful, we can find a
way to emit it in a way that doesn't interfere with overhauling compiletests's
output capture system.
2025-08-29 13:16:24 +10:00
Zalathar
c80cadee64 Move module compute_diff into compiletest::runtest
The code in this module is always called in the context of running an
individual tests, and sometimes prints output that needs to be captured.

Moving this module into `runtest` will make it easier to find and audit all of
the print statements that need to be updated when overhauling output-capture.
2025-08-29 13:11:27 +10:00
Zalathar
269db62491 Change the logv function into a TestCx method.
When working on a new output-capture system, this will make it easier to obtain
a capturing stream from the test context.
2025-08-29 13:11:27 +10:00
Zalathar
3d54f19421 Don't bother logging an arbitrary subset of the compiletest config
Running `./x --verbose` will still print out the command-line arguments, and
setting `RUST_LOG=compiletest` will now log the full config instead of a
subset.
2025-08-29 13:10:24 +10:00
Stuart Cook
31eafafe3b Rollup merge of #145977 - CaiWeiran:basic-stepping-test, r=jieyouxu
tests: Ignore basic-stepping.rs on riscv64

Same as [PR 145745](https://github.com/rust-lang/rust/pull/145745)

r? `@lqd`
2025-08-29 12:54:13 +10:00
Caiweiran
a54567e76c tests: Ignore basic-stepping.rs on riscv64 2025-08-29 08:11:48 +00:00
Stuart Cook
5c0cd83301 Rollup merge of #145972 - neeko-cat:patch-2, r=ibraheemdev
fix `core::marker::Destruct` doc

`~const` bounds are now `[const]` I think...

Related:   rust-lang/rust#143874, rust-lang/rust#133214
2025-08-29 12:54:13 +10:00
Stuart Cook
2246dda682 Rollup merge of #145947 - nnethercote:workspace-members-2, r=Kobzol
Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml`

Following on from rust-lang/rust#145740.

r? `@Kobzol`
2025-08-29 12:54:12 +10:00
Stuart Cook
4ccf8ca720 Rollup merge of #145884 - clubby789:test-mcount, r=Mark-Simulacrum
Test `instrument-mcount` codegen

Closes rust-lang/rust#92109 by testing that a call to `mcount` is actually emitted
2025-08-29 12:54:11 +10:00
Stuart Cook
4b0933a0a5 Rollup merge of #145793 - he32:netbsd-libexecinfo-fix, r=Mark-Simulacrum
std library: use execinfo library also on NetBSD.

The execinfo library is also available on NetBSD.
2025-08-29 12:54:11 +10:00
Stuart Cook
dd03ce8cba Rollup merge of #145387 - zachs18:remove-tmplayout, r=cjgillot
Remove TmpLayout in layout_of_enum

09a3846 from <https://github.com/rust-lang/rust/pull/103693> made LayoutData be owned instead of interned in `Variants::Multiple::variants`[^1], so there's no need for `TmpLayout` in layout_of_enum anymore, and we can just store the variants' layouts directly in the prospective `LayoutData`s' `variants` fields.

This should have no effect on semantics or layout.

(written as part of rust-lang/rust#145337 but not related to the layout optimizations in that PR)

[^1]: see line 1154 of `compiler/rustc_target/src/abi/mod.rs` in the linked commit; `Variants::Multiple::variants` effectively changed from `IndexVec<.., Layout<'tcx>>` to `IndexVec<.., LayoutData>`  where the `LayoutData`s are not interned as `Layout`s (`LayoutData` was at the time called `LayoutS`)
2025-08-29 12:54:10 +10:00
Stuart Cook
6ac6eb6f49 Rollup merge of #144354 - rafaeling:fix-142726-qnx8-link-fail, r=tgross35
fix(std): Fix undefined reference to __my_thread_exit on QNX 8.0

When cross-compiling for the x86_64/aarch64-unknown-nto-qnx800 target (QNX SDP 8.0), the build fails during the final link stage with the error:
```
error: linking with `qcc` failed: exit status: 1
  ...
  = note: undefined reference to `__my_thread_exit'
 ```

- **On QNX 7.1**: The __my_thread_exit symbol is defined and exported by the main C library (libc.a/libc.so). The std backtrace code can therefore successfully take its address at compile time.

- **On QNX 8.0**: As part of a toolchain modernization, this symbol has been refactored. It is no longer present in any of the standard system libraries (.a or .so).

This patch addresses the problem at its source by conditionally compiling the problematic code.

Fixes rust-lang/rust#142726
2025-08-29 12:54:10 +10:00
Stuart Cook
ef50370ec1 Rollup merge of #144275 - Qelxiros:saturating-arithmetic, r=tgross35
implement Sum and Product for Saturating(u*)

ACP: rust-lang/libs-team#604

`@rustbot` label +needs-fcp
2025-08-29 12:54:09 +10:00
Stuart Cook
2bd53b7d17 Rollup merge of #143713 - tgross35:mailmap, r=Mark-Simulacrum
Add a mailmap entry for gnzlbg

The submodule->subtree changes add a lot of commits with the GitHub email.
2025-08-29 12:54:08 +10:00
bors
ef8d1d6f5b Auto merge of #145377 - ChayimFriedman2:solver-def-id, r=lcnr
Switch next solver to use a specific associated type for trait def id

The compiler just puts `DefId` in there, but rust-analyzer uses different types for each kind of item.

See [the Zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/Implmentating.20New.20Trait.20Solver/near/534329794). In short, it will be a tremendous help to r-a to use specific associated types, while for the solver and the compiler it's a small change. So I ported `TraitId`, as a proof of concept and it's also likely the most impactful.

r? types
2025-08-29 00:32:21 +00:00
Matthew Maurer
2d0668d37c Mark pipe2 supported in Android
Android has supported pipe2 since 2010, long before the current min SDK.
2025-08-29 00:18:39 +00:00
Jeremy Smart
1a33d628df implement Sum and Product for Saturating(u*) 2025-08-28 18:38:53 -04:00
neeko-cat
df802ccd2f fix core::marker::Destruct doc 2025-08-28 22:19:37 +02:00
bors
f2824da98d Auto merge of #145970 - GuillaumeGomez:rollup-pr11qds, r=GuillaumeGomez
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#142472 (Add new `doc(attribute = "...")` attribute)
 - rust-lang/rust#145368 (CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`)
 - rust-lang/rust#145853 (Improve error messages around invalid literals in attribute arguments)
 - rust-lang/rust#145920 (bootstrap: Explicitly mark the end of a failed test's captured output)
 - rust-lang/rust#145937 (add doc-hidden to exports in attribute prelude)
 - rust-lang/rust#145965 (Move exporting of profiler and sanitizer symbols to the LLVM backend)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-28 19:57:03 +00:00
Guillaume Gomez
a60b96a3d4 Rollup merge of #145965 - bjorn3:sanitize_symbol_export_improvements, r=lqd
Move exporting of profiler and sanitizer symbols to the LLVM backend

Only the LLVM backend needs those specific symbols exported and it only needs them to be exported for LTO, not from cdylibs in general.
2025-08-28 21:41:03 +02:00
Guillaume Gomez
b944a43660 Rollup merge of #145937 - jdonszelmann:doc-hidden-prelude, r=fmease
add doc-hidden to exports in attribute prelude

Seems to fix rust-lang/rust#145870, at least temporarily. The underlying problem of course is still there.

r? `@fmease`

<img width="653" height="167" alt="image" src="https://github.com/user-attachments/assets/b5a8094c-849e-4328-997d-b772f9aa4088" />

Fixes rust-lang/rust#145870
2025-08-28 21:41:03 +02:00
Guillaume Gomez
347dd4741f Rollup merge of #145920 - Zalathar:failure-stdout, r=jieyouxu
bootstrap: Explicitly mark the end of a failed test's captured output

While working on some compiletest stuff, I noticed that when bootstrap prints a failed test's captured output, there's no indication of where that output actually ends.

In addition to indicating where the captured output ends, this end marker also makes it easier to see the relevant test name when scrolling upwards in terminal output.
2025-08-28 21:41:02 +02:00
Guillaume Gomez
56c68e78dd Rollup merge of #145853 - JonathanBrouwer:fix-lit-parsing, r=jdonszelmann
Improve error messages around invalid literals in attribute arguments

r? `@jdonszelmann`

This previously created two errors, which is a bit ugly and the second one didn't add any value
Blocked on https://github.com/rust-lang/rust/pull/143193
2025-08-28 21:41:01 +02:00
Guillaume Gomez
9e4a283615 Rollup merge of #145368 - rcvalle:rust-cfi-fix-142284, r=dianqk
CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`

Fix rust-lang/rust#142284 by ensuring that `#![no_builtins]` crates can still emit bitcode when proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto) is used.
2025-08-28 21:41:01 +02:00