Commit graph

166669 commits

Author SHA1 Message Date
Ralf Jung
a5d1629370 make cur_span and current_span harder to mix up 2025-10-02 09:25:19 +02:00
Ralf Jung
38d129eeb4 rustup 2025-10-02 09:13:29 +02:00
Ralf Jung
1c16821db8
Merge pull request #4611 from Patrick-6/miri-genmc-temporal-mixing
Add support for temporal mixing of atomic and non-atomic accesses in GenMC mode
2025-10-01 12:02:45 +00:00
Patrick-6
574ff896d6 Implement support for temporal mixing of atomic/non-atomic accesses in GenMC mode.
Remove atomic initialization dummy writes from tests.
2025-10-01 12:35:59 +02:00
The Miri Cronjob Bot
73562f00ee Merge ref '29b7717de2' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 29b7717de2
Filtered ref: fb4b6388017a4b5fa9806863ffe33ed23df840d4
Upstream diff: f957826bff...29b7717de2

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-30 05:01:17 +00:00
Jynn Nelson
3e26e2a3a9 Don't unconditionally build alloc for no-std targets
It's possible for targets to only support `core` and not `alloc`.
Instead of building alloc unconditionally, pass a list of crates to
build into `std_cargo`, and only pass `-p alloc` if the list of crates
wasn't already filtered to a subset.

The original use case was to reuse `std_cargo` for a rustc_driver that
doesn't emit metadata. But this seems like a reasonable change
regardless.
2025-10-01 16:58:38 -07:00
The Miri Cronjob Bot
8b51a63dbb Prepare for merging from rust-lang/rust
This updates the rust-version file to 29b7717de2.
2025-09-30 04:53:35 +00:00
Ralf Jung
bbe778ec02
Merge pull request #4609 from RalfJung/genmc-targets
genmc: bail out for non-64bit-little-endian targets
2025-09-29 21:20:52 +00:00
Ralf Jung
cfefa9bc88 genmc: bail out for non-64bit-little-endian targets 2025-09-29 22:52:06 +02:00
Ralf Jung
739d858804
Merge pull request #4603 from Patrick-6/miri-genmc-provenance
Implement Pointer conversions to and from GenMC.
2025-09-29 20:45:02 +00:00
Patrick-6
8b38760176 Implement Pointer conversions to and from GenMC. Limitation: Borrow tracking must be disabled. Remove hacks for keeping all memory allocations in GenMC mode. 2025-09-29 19:12:54 +02:00
bors
dc2c3564d2 Auto merge of #146376 - durin42:dwo-specify-path, r=davidtwco
debuginfo: add an unstable flag to write split DWARF to an explicit directory

Bazel requires knowledge of outputs from actions at analysis time, including file or directory name. In order to work around the lack of predictable output name for dwo files, we group the dwo files in a subdirectory of --out-dir as a post-processing step before returning control to bazel. Unfortunately some debugging workflows rely on directly opening the dwo file rather than loading the merged dwp file, and our trick of moving the files breaks those users. We can't just hardlink the file or copy it, because with remote build execution we wouldn't end up with the un-moved file copied back to the developer's workstation. As a fix, we add this unstable flag that causes dwo files to be written to a build-system-controllable location, which then lets bazel hoover up the dwo files, but the objects also have the correct path for the dwo files.

r? `@davidtwco`
2025-09-29 15:06:55 +00:00
bors
21a13b8864 Auto merge of #147151 - Zalathar:rollup-w81rn0j, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146653 (improve diagnostics for empty attributes)
 - rust-lang/rust#146987 (impl Ord for params and use unstable sort)
 - rust-lang/rust#147101 (Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library )
 - rust-lang/rust#147123 (Fix removed version numbers of `doc_auto_cfg` and `doc_cfg_hide`)
 - rust-lang/rust#147149 (add joboet to library review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-29 11:52:07 +00:00
Stuart Cook
08616a1745
Rollup merge of #147101 - yotamofek:pr/iter-eq-and-eq-by, r=jdonszelmann
Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library

Now that rust-lang/rust#137122 has landed, we can replace stuff that looks like:
```rust
let a: &[T];
let b: &[T];
let eq = a.len() == b.len() && a.iter().zip(b).all(|(a,b)| a == b)
```
with the much simpler `a.iter().eq(b)`, without losing the perf benefit of the different-length-fast-path.
Also dogfooded `Iterator::eq_by` (cc rust-lang/rust#64295 ) while I'm at it.

First commit (4d1b6fad230f8a5ccceccc7562eadc4ea50059da) should be very straightforward to review, second one (049a4606cb3906787aedf508ee8eea09c2bb3b9a) is slightly more creative, but IMHO a nice cleanup.
2025-09-29 21:06:45 +10:00
bors
128b36a4a4 Auto merge of #147145 - Zalathar:rollup-s7kcs3w, r=Zalathar
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue)
 - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout)
 - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-29 08:43:49 +00:00
Stuart Cook
cd6f32a4eb
Rollup merge of #147134 - workingjubilee:remove-explicit-abialign-deref, r=Zalathar
remove explicit deref of AbiAlign for most methods

Much of the compiler calls functions on Align projected from AbiAlign. AbiAlign impls Deref to its inner Align, so we can simplify these away. Also, it will minimize disruption when AbiAlign is removed.

For now, preserve usages that might resolve to PartialOrd or PartialEq, as those have odd inference.
2025-09-29 15:44:55 +10:00
Yotam Ofek
68a7c25078 Use Iterator::eq and (dogfood) eq_by in compiler and library 2025-09-29 08:08:05 +03:00
The Miri Cronjob Bot
14d02ab2db Merge ref 'f957826bff' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: f957826bff
Filtered ref: 60bcfdb370a3bae71714fc99a88aa9f2d2892733
Upstream diff: 848e6746fe...f957826bff

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-29 05:01:37 +00:00
Walnut
608c6614b1 fix msvc enum summary 2025-10-02 04:17:24 -05:00
The Miri Cronjob Bot
2d038a0ed3 Prepare for merging from rust-lang/rust
This updates the rust-version file to f957826bff.
2025-09-29 04:53:44 +00:00
Stuart Cook
3ea1bab982
Rollup merge of #146929 - Zalathar:capture, r=Kobzol,jieyouxu
compiletest: Remove old-output-capture and become a stage0 bootstrap tool

The new compiletest output-capture system became the default in rust-lang/rust#146574, and no problems have been reported since.

This PR therefore removes the old output-capture implementation from compiletest, and adjusts bootstrap to always build and test compiletest as a stage0 bootstrap tool.

In other words, compiletest no longer relies on any unstable features (such as `libtest` or `internal_output_capture`), and is now written entirely in stable Rust!

The compiletest self-tests still need access to an in-tree rustc, in order to obtain information via `rustc --print`, so we interpret `--stage` as indicating the stage of that secondary compiler, but always use the stage0 compiler to build compiletest itself.

r? Kobzol
2025-09-29 11:56:41 +10:00
Jubilee Young
0c9d0dfe04 remove explicit deref of AbiAlign for most methods
Much of the compiler calls functions on Align projected from AbiAlign.
AbiAlign impls Deref to its inner Align, so we can simplify these away.
Also, it will minimize disruption when AbiAlign is removed.

For now, preserve usages that might resolve to PartialOrd or PartialEq,
as those have odd inference.
2025-09-28 15:02:14 -07:00
bors
f957826bff Auto merge of #146513 - madsmtm:apple-reenable-assertions, r=Mark-Simulacrum
Re-enable assertions on macOS alt builds

These were previously disabled, in part for performance reasons, in part due to needing availability symbols `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` that `compiler-builtins` did not provide, see https://github.com/rust-lang/rust/pull/62592#issuecomment-510670657 and https://github.com/rust-lang/rust/pull/134275#issuecomment-2543067830 for failed checks.

Since https://github.com/rust-lang/rust/pull/138944 though, `std` now provides these symbols, so we should be able to re-enable LLVM assertions, debug assertions and overflow checks.

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

try-job: `*apple*`
2025-09-28 21:40:04 +00:00
bors
c8905eaa66 Auto merge of #147128 - matthiaskrgr:rollup-mqey4c4, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#140482 (std::net: update tcp deferaccept delay type to Duration.)
 - rust-lang/rust#141469 (Allow `&raw [mut | const]` for union field in safe code)
 - rust-lang/rust#144197 (TypeTree support in autodiff)
 - rust-lang/rust#146675 (Allow shared access to `Exclusive<T>` when `T: Sync`)
 - rust-lang/rust#147113 (Reland "Add LSX accelerated implementation for source file analysis")
 - rust-lang/rust#147120 (Fix --extra-checks=spellcheck to prevent cargo install every time)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-28 16:36:14 +00:00
Matthias Krüger
4eb6b8f43f
Rollup merge of #147120 - Shunpoco:issue-147105, r=Kobzol
Fix --extra-checks=spellcheck to prevent cargo install every time

Fixes rust-lang/rust#147105

## Background
Current implementation of `ensure_version_of_cargo_install` uses `bin_name` to check if it exists, but it should use `<tool_root_dir>/<tool_bin_dir>/<bin_name>` instead. Otherwise the check fails every time, hence the function falls back to install the binary.

## Change
Move lines which define bin_path at the top of the function, and use bin_path for the check
2025-09-28 18:13:13 +02:00
Matthias Krüger
6059195875
Rollup merge of #141469 - Kivooeo:remove-usnsafegate, r=compiler-errors
Allow `&raw [mut | const]` for union field in safe code

fixes rust-lang/rust#141264

r? ``@Veykril``

Unresolved questions:

- [x] Any edge cases?
- [x] How this works with rust-analyzer (because all I've did is prevent compiler from emitting error in `&raw` context) (rust-lang/rust-analyzer#19867)
- [x] Should we allow `addr_of!` and `addr_of_mut!` as well? In current version they both (`&raw` and `addr_of!`) are allowed (They are the same)
- [x] Is chain of union fields is a safe? (Yes)
2025-09-28 18:13:11 +02:00
bors
8d72d3e1e9 Auto merge of #147002 - notriddle:stringdex3, r=GuillaumeGomez
rustdoc-search: stringdex update with more packing

Before:

    18M  build/x86_64-unknown-linux-gnu/doc/search.index/
    57M  build/x86_64-unknown-linux-gnu/compiler-doc/search.index/

After:

    16M  build/x86_64-unknown-linux-gnu/doc/search.index/
    49M  build/x86_64-unknown-linux-gnu/compiler-doc/search.index/

CC rust-lang/rust#146063
2025-09-28 13:29:26 +00:00
bors
a00a5159cf Auto merge of #147118 - matthiaskrgr:rollup-4yqmoyr, r=matthiaskrgr
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#142139 (Include additional hashes in src/stage0)
 - rust-lang/rust#146745 (Clarified error note for usize range matching)
 - rust-lang/rust#146763 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 5))
 - rust-lang/rust#146788 (chore: removes deprecated discord.)
 - rust-lang/rust#146942 ([rustdoc] Finish getting rid of usages `write_str`)
 - rust-lang/rust#147061 (fix rebasing cycle heads when not reaching a fixpoint)
 - rust-lang/rust#147066 (Fix tracking issue number for feature(macro_attr))
 - rust-lang/rust#147081 (doc: fix a typo in platform-support.md)
 - rust-lang/rust#147082 (formatting_options: fix alternate docs 0b/0o mixup)
 - rust-lang/rust#147086 (compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta)
 - rust-lang/rust#147093 (redox: switch to colon as path separator)
 - rust-lang/rust#147095 (Library: Remove remaining private `#[repr]` workarounds)
 - rust-lang/rust#147098 (Add auto extra-checks in pre-push hook)
 - rust-lang/rust#147110 (Fix typo)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-28 10:20:57 +00:00
Shunpoco
5e9cab3921 modify ensure_version_or_cargo_install to check existing binary
Current implementation uses bin_name to check if it exists,
but it should use tool_root_dir/tool_bin_dir/bin_name instead.
Otherwise the check fails every time, hence the function falls back to
install the binary.
2025-09-28 09:46:20 +01:00
Zalathar
8b1879864b tool_check_step! no longer needs a builder to determine mode 2025-09-28 17:18:07 +10:00
Zalathar
193f7179cc Build and test compiletest as a stage0 bootstrap tool 2025-09-28 17:18:07 +10:00
Zalathar
7b8ae74da1 Add a bootstrap snapshot test for x test compiletest 2025-09-28 17:18:07 +10:00
Zalathar
e99364ea35 Remove old-output-capture from compiletest 2025-09-28 17:18:07 +10:00
Zalathar
cc7bd291cd Fix change-tracker entry for 147046 2025-09-28 17:18:07 +10:00
Matthias Krüger
f31963ff82
Rollup merge of #147098 - Shunpoco:issue-147088, r=Kobzol
Add auto extra-checks in pre-push hook

Fixes rust-lang/rust#147088

This PR adds auto py, cpp, and js extra checks into the pre-push script.
- It checks those non-Rust files only if they are modified in the commit
- Thanks to auto mode, the pre-push doesn't check them if none of them are modified. It means that it doesn't build venv, nor install node_packages under build/

Note that this PR doesn't add shellcheck and spellcheck, because
- Currently shellcheck isn't installed by the tidy command unlike venv/node_modules. So it forces developers to take a extra task to enable pre-push hook
- Spellcheck is built whenever I kick test tidy with the option. If I enables it, developers should wait extra time for running pre-push hook
2025-09-28 09:15:30 +02:00
Matthias Krüger
925951dddc
Rollup merge of #147086 - Zalathar:payload, r=jieyouxu
compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta

Nice little FIXME cleanup after the bootstrap beta bump to 1.91 in https://github.com/rust-lang/rust/pull/146636.

r? jieyouxu
2025-09-28 09:15:28 +02:00
Matthias Krüger
93fff3db2a
Rollup merge of #147081 - moturus:fix_md, r=workingjubilee
doc: fix a typo in platform-support.md

Fix a typo.
2025-09-28 09:15:27 +02:00
Matthias Krüger
f349faa25f
Rollup merge of #146942 - yotamofek:pr/rustdoc/finish_deprecating_write_str, r=GuillaumeGomez
[rustdoc] Finish getting rid of usages `write_str`

This PR, along with rust-lang/rust#146933 , get rid of all the last usages of the `write_str` fn that was introduced back in rust-lang/rust#136784 .

This *shouldn't* be rolled up along with rust-lang/rust#146933 , since the later of the two to be merged will need to delete the no-longer-used `write_str` fn.
Commits can be reviewed separately.
2025-09-28 09:15:25 +02:00
Matthias Krüger
4e9cfc726c
Rollup merge of #142139 - erickt:include-hashes, r=Mark-Simulacrum
Include additional hashes in src/stage0

This patch changes `bump-stage0` to include:

* The sha256 hash of the channel manifest used to create `src/stage0`.
* The rust and rustfmt git commit in `src/stage0`.
* Hashes of all the artifacts, like the source tarball, in `src/stage0`.

Combined this will allow for:

* Projects that bootstrap their own compiler, such as Fuchsia, or users of [bootstrap], to build their compilers offline without needing to communicate with static.rust-lang.org.

* Auditors to detect if the channel manifest, and all the artifacts inside the manifest, were modified after it was used to generate `src/stage0`. Furthermore, if they did find modified artifacts, they could determine if the Rust Signing Key was compromised by checking if any modified file was signed properly.

finally, it allows regeneration of `src/stage0` when specifying both the day of the build for rust, and the day of the build for rustfmt, which can allow a maintainer to regenerate `src/stage0` to verify nothing changed.

[bootstrap]: https://github.com/dtolnay/bootstrap
[mrustc]: https://github.com/thepowersgang/mrustc
2025-09-28 09:15:22 +02:00
bors
4ffeda10e1 Auto merge of #147045 - notriddle:search-index-entrydata-path, r=GuillaumeGomez
rustdoc-search: use the same ID for entry and path to same item

This decreases the size of the compiler-doc from 57MiB to 56MiB.

r? `@GuillaumeGomez`
2025-09-28 07:13:23 +00:00
The Miri Cronjob Bot
9762c4349b Merge ref '848e6746fe' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 848e6746fe
Filtered ref: 8a7a804ec197b593f553a523e3f76baf5fd56d0e
Upstream diff: b733736ea2...848e6746fe

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-28 05:00:31 +00:00
The Miri Cronjob Bot
5debc4368c Prepare for merging from rust-lang/rust
This updates the rust-version file to 848e6746fe.
2025-09-28 04:52:54 +00:00
bors
848e6746fe Auto merge of #147104 - matthiaskrgr:rollup-gap1v0w, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#146037 (Introduce CoerceShared lang item and trait, and basic Reborrow tests)
 - rust-lang/rust#146732 (tests: relax expectations after llvm change 902ddda120a5)
 - rust-lang/rust#147018 (re-order normalizations in run-make linker-warning test)
 - rust-lang/rust#147032 (Fix doctest compilation time display)
 - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`)
 - rust-lang/rust#147050 (PassWrapper: update for new PGOOptions args in LLVM 22)
 - rust-lang/rust#147075 (Make `def_path_hash_to_def_id` not panic when passed an invalid hash)
 - rust-lang/rust#147076 (update issue number for more_float_constants)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-27 22:30:56 +00:00
bors
4082d6a3f0 Auto merge of #146927 - Kobzol:install-clif, r=jieyouxu
Make it possible to `x install` Cranelift and LLVM bitcode linker

It was not possible to install these before, as they were not in the install step description list.

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

r? `@jieyouxu`
2025-09-27 19:26:29 +00:00
Matthias Krüger
82dff12cdf
Rollup merge of #147046 - Kobzol:bootstrap-ll, r=jieyouxu
Rename `rust.use-lld` to `rust.bootstrap-override-lld`

First part of https://github.com/rust-lang/rust/issues/146640. The old option is kept for backwards compatibility, we can remove it in ~6 months, as usually.

I'm not sure if the bootstrap prefix is ideal, after all we have a bunch of other configs that only affect bootstrap's behavior and not the built artifacts. Maybe `build.override-lld`? But I don't think it matters that much, as long as it's clear that it is an override, and how does it differ from `rust.lld`.

r? ``@jieyouxu``
2025-09-27 21:25:58 +02:00
Matthias Krüger
a11a211d7c
Rollup merge of #147032 - GuillaumeGomez:fix-doctest-compilation-time-display, r=lolbinarycat
Fix doctest compilation time display

Fixes rust-lang/rust#146960.

Small corner case that happened in case everything went fine and there was only merged doctests.

r? lolbinarycat
2025-09-27 21:25:58 +02:00
Shunpoco
aef976ed4c Add auto extra-checks in pre-push script
It enables automatic check changes of Python/C++/JS
before pushing the changes to remote repository.
Those checks happen only when the target type of file is changed.
Otherwise it does not install any dependencies (venv and/or node_modules).
Note that shellcheck and spellcheck are not included in this change, because:
1. Unlike venv/node_modules, shellcheck is not installed automatically by the command, and
2. spellcheck is built whenever pre-push script is run, it forces developer to wait extra time
So not to break the current productivity, this commit skips them.
2025-09-27 17:39:06 +01:00
Mads Marquart
9878be7787 Re-enable assertions on macOS 2025-09-27 18:06:00 +02:00
Mark Rousskov
76bb0d1870 Update stage0 per previous commmit 2025-09-27 08:45:40 -04:00
Erick Tryzelaar
d42acf522f Include additional hashes in src/stage0
This patch changes `bump-stage0` to include:

* The sha256 hash of the channel manifest used to create `src/stage0`.
* The rust and rustfmt git commit in `src/stage0`.
* Hashes of all the artifacts, like the source tarball, in `src/stage0`.

Combined this will allow for:

* Projects that bootstrap their own compiler, such as Fuchsia, or users
  of [bootstrap], to build their compilers offline without needing to
  communicate with static.rust-lang.org.

* Auditors to detect if the channel manifest, and all the artifacts
  inside the manifest, were modified after it was used to generate
  `src/stage0`. Furthermore, if they did find modified artifacts, they
  could determine if the Rust Signing Key was compromised by checking if
  any modified file was signed properly.

Finally, it allows regeneration of `src/stage0` when specifying both the
day of the build for rust, and the day of the build for rustfmt, which
can allow a maintainer to regenerate `src/stage0` to verify nothing
changed.

[bootstrap]: https://github.com/dtolnay/bootstrap
[mrustc]: https://github.com/thepowersgang/mrustc
2025-09-27 08:43:22 -04:00