Commit graph

304400 commits

Author SHA1 Message Date
Oli Scherer
c8d20ceb1b
Merge pull request #4548 from rust-lang/rustup-2025-08-30
Automatic Rustup
2025-08-30 07:07:41 +00:00
The Miri Cronjob Bot
d269d234e0 Merge ref 'e004014d1b' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: e004014d1b
Filtered ref: d62798e442c1c6ec461725b87dacc87c285259c8

This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-30 05:00:00 +00:00
The Miri Cronjob Bot
435de36225 Prepare for merging from rust-lang/rust
This updates the rust-version file to e004014d1b.
2025-08-30 04:52:26 +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
Ben Kimock
b00c449ef7
Merge pull request #4546 from rust-lang/dependabot/cargo/tracing-subscriber-0.3.20
Bump tracing-subscriber from 0.3.19 to 0.3.20
2025-08-29 21:34:00 +00:00
dependabot[bot]
615450e1ac
Bump tracing-subscriber from 0.3.19 to 0.3.20
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.19 to 0.3.20.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.19...tracing-subscriber-0.3.20)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-version: 0.3.20
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-29 20:57:03 +00:00
Ralf Jung
aabfe43245
Merge pull request #4371 from CraftSpider/duplicate-handle-test
Add shim test for `DuplicateHandle`
2025-08-29 18:50:21 +00:00
Rune Tynan
497df6006d Add duplicate handle test + make null lpTargetHandle an abort, not an unsupported. 2025-08-29 11:14:31 -07: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
Ralf Jung
74ade5b93e
Merge pull request #4545 from RalfJung/zst-readwrite
unix read/write: fix zero-size handling
2025-08-29 13:50:09 +00:00
Ralf Jung
01ed1052d8 unix read/write: fix zero-size handling 2025-08-29 15:13:55 +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