Commit Graph

3265 Commits

Author SHA1 Message Date
Jakub Beránek 80e102ff68
Rollup merge of #137967 - mustartt:fix-aix-test-hangs, r=workingjubilee
[AIX] Fix hangs during testing

Fixes all current test hangs experienced during CI runs.
1. ipv6 link-local (the loopback device) gets assigned an automatic zone id of 1, causing the assert to fail and hang in `library/std/src/net/udp/tests.rs`
2. Const alloc does not fail gracefully
3. Debuginfo test has problem with gdb auto load safe path
2025-03-11 13:30:50 +01:00
Jakub Beránek 2df67fb43b
Rollup merge of #135987 - hkBst:patch-20, r=joboet
Clarify iterator by_ref docs

fixes #95143
2025-03-11 13:30:49 +01:00
bors eb9d046031 Auto merge of #137586 - nnethercote:SetImpliedBits, r=bjorn3
Speed up target feature computation

The LLVM backend calls `LLVMRustHasFeature` twice for every feature. In short-running rustc invocations, this accounts for a surprising amount of work.

r? `@bjorn3`
2025-03-11 12:05:16 +00:00
Jakub Beránek dd0359476d Handle backticks in try job patterns 2025-03-10 14:07:46 +01:00
Jakub Beránek 074e4787bd Modify try-job documentation 2025-03-10 14:07:45 +01:00
Oli Scherer 7119746828
Merge pull request #2258 from fee1-dead-contrib/constck
Rewrite effects checking chapter
2025-03-10 12:35:40 +01:00
许杰友 Jieyou Xu (Joe) 6ae1d4d997
Merge pull request #2273 from rust-lang/tshepang-patch-1
use new terminology
2025-03-10 17:59:15 +08:00
Tshepang Mbambo 5c28a545e3
Merge pull request #2277 from rust-lang/tshepang-patch-2
add missing punctuation
2025-03-10 11:16:05 +02:00
Tshepang Mbambo 53f8a2f1d6
add missing punctuation 2025-03-10 11:15:32 +02:00
Tshepang Mbambo 511c7c2ea0
Merge pull request #2276 from rust-lang/tshepang-patch-2
clean --bless text
2025-03-10 11:13:42 +02:00
Tshepang Mbambo 12b836b37c
clean --bless text 2025-03-10 11:12:44 +02:00
Tshepang Mbambo 6e008e3574
Merge pull request #2275 from rust-lang/tshepang-patch-2
add a pause, for readability
2025-03-10 10:39:05 +02:00
Tshepang Mbambo 916cd09d33
add a pause, for readability 2025-03-10 10:38:30 +02:00
Tshepang Mbambo 0e45389022
Merge pull request #2274 from rust-lang/tshepang-patch-2
already mentioned before showing code snippet
2025-03-10 10:36:19 +02:00
Tshepang Mbambo 20b3dc1ee0
already mentioned before showing code snippet 2025-03-10 10:35:40 +02:00
bors 7f7659329e Auto merge of #138200 - weihanglo:update-cargo, r=weihanglo
Update cargo

22 commits in 2622e844bc1e2e6123e54e94e4706f7b6195ce3d..ab1463d632528e39daf35f263e10c14cbe590ce8
2025-02-28 12:33:57 +0000 to 2025-03-08 01:45:05 +0000
- test: redact host target when comparing CARGO_ENV path (rust-lang/cargo#15279)
- feat: add completions for install --path (rust-lang/cargo#15266)
- fix(package): report lockfile / workspace manifest is dirty  (rust-lang/cargo#15276)
- feat(tree): Add `--depth public` behind `-Zunstable-options` (rust-lang/cargo#15243)
- Don't use `$CARGO_BUILD_TARGET` in `cargo metadata` (rust-lang/cargo#15271)
- feat: show extra build description from bootstrap (rust-lang/cargo#15269)
- Upgrade to `rustc-stable-hash v0.1.2` (rust-lang/cargo#15268)
- fix: Respect --frozen everywhere --offline or --locked is accepted (rust-lang/cargo#15263)
- feat(tree): Color the output (rust-lang/cargo#15242)
- fix(vendor): dont remove non-cached source  (rust-lang/cargo#15260)
- docs: lockfile is always included since 1.84 (rust-lang/cargo#15257)
- Remove `Cargo.toml` from `package.include` in example (rust-lang/cargo#15253)
- Small cleanup: remove unneeded result (rust-lang/cargo#15256)
- Fix typo in build-scripts.md (rust-lang/cargo#15254)
- chore(deps): update rust crate pulldown-cmark to 0.13.0 (rust-lang/cargo#15250)
- chore(deps): update compatible (rust-lang/cargo#15249)
- feat(cli): forward bash completions of third party subcommands (rust-lang/cargo#15247)
- feat: add completions for `--lockfile-path` (rust-lang/cargo#15238)
- fix: reset $CARGO if the running program is real `cargo[.exe]`  (rust-lang/cargo#15208)
- Get all members as `available targets` even though default-members was specified. (rust-lang/cargo#15199)
- refactor: control byte display precision with std::fmt options (rust-lang/cargo#15246)
- fix(package): Ensure we can package directories ending with '.rs' (rust-lang/cargo#15240)
2025-03-10 08:31:27 +00:00
Tshepang Mbambo 1d3b59fa4a
use new terminology 2025-03-10 10:29:30 +02:00
bors 56f7ce766f Auto merge of #137695 - nnethercote:always-inline-query_get_at, r=saethlin
Always inline `query_get_at`.

r? `@saethlin`
2025-03-09 21:36:57 +00:00
bors 9bb14794f4 Auto merge of #137655 - nnethercote:split-edges-iterator, r=nnethercote
Split the `Edges` iterator.

Some nice performance wins here, mostly on the `wg-grammar` benchmark.

r? `@lcnr`
2025-03-09 15:30:47 +00:00
bors 8745ead503 Auto merge of #137563 - FractalFir:dep_graph_cap, r=nnethercote
Change TaskDeps to start preallocated with 128 capacity

This is a tiny change that makes `TaskDeps::read_set` start preallocated with capacity for 128 elements.

From local profiling, it looks like `TaskDeps::read_set`  is one of the most-often resized hash-sets in `rustc`.
2025-03-09 09:27:35 +00:00
bors ff1c2b2824 Auto merge of #137541 - onur-ozkan:fix-cargo-clippy-bin, r=jieyouxu
add `tool::CargoClippy` and `tool::Cargofmt` binary to target sysroot

When running `x build clippy`, we expect `stage1-tool-bin/cargo-clippy` and `stage2/bin/cargo-clippy` to be the same, but they aren't. This happens because `tool::CargoClippy` doesn't place its binary in the `stage2` directory. As a result, `stage1-tool-bin/cargo-clippy` comes from `tool::CargoClippy`, while `stage2/bin/cargo-clippy` comes from `tool::Cargo`. Same applies for `tool::Cargofmt`.

This PR fixes the issue by adding `tool::CargoClippy` and ``tool::Cargofmt`` binaries to the expected sysroot and makes sure both directories share the same binary.

To test this, run `x build --stage 2 compiler clippy rustfmt`, link the stage2 sysroot with rustup, and then call `cargo +stage2 fmt` and `cargo +stage2 clippy` on any rust project (it wouldn't work without this PR).
2025-03-09 04:31:52 +00:00
bors ceecf71edc Auto merge of #137513 - scottmcm:identity-transmute, r=saethlin
Don't re-`assume` in `transmute`s that don't change niches

I noticed in nightly 2025-02-21 that `transmute` is emitting way more `assume`s than necessary for newtypes.

For example, the three transmutes in <https://rust.godbolt.org/z/fW1KaTc4o> emits
```rust
define noundef range(i32 1, 0) i32 `@repeatedly_transparent_transmute(i32` noundef range(i32 1, 0) %_1) unnamed_addr {
start:
  %0 = sub i32 %_1, 1
  %1 = icmp ule i32 %0, -2
  call void `@llvm.assume(i1` %1)
  %2 = sub i32 %_1, 1
  %3 = icmp ule i32 %2, -2
  call void `@llvm.assume(i1` %3)
  %4 = sub i32 %_1, 1
  %5 = icmp ule i32 %4, -2
  call void `@llvm.assume(i1` %5)
  %6 = sub i32 %_1, 1
  %7 = icmp ule i32 %6, -2
  call void `@llvm.assume(i1` %7)
  %8 = sub i32 %_1, 1
  %9 = icmp ule i32 %8, -2
  call void `@llvm.assume(i1` %9)
  %10 = sub i32 %_1, 1
  %11 = icmp ule i32 %10, -2
  call void `@llvm.assume(i1` %11)
  ret i32 %_1
}
```

But those are all just newtypes that don't change size or niches, so none of it's needed.

After this PR it's down to just
```rust
define noundef range(i32 1, 0) i32 `@repeatedly_transparent_transmute(i32` noundef range(i32 1, 0) %_1) unnamed_addr {
start:
  ret i32 %_1
}
```
because none of those `assume`s in the original actually did anything.

(Transmuting to something with a difference niche, though, still has the assumes -- the other tests continue to pass checking that.)
2025-03-09 01:25:48 +00:00
许杰友 Jieyou Xu (Joe) 9182eb6fe7
Merge pull request #2270 from tshepang/example-llvm-prs
mention llvm 20 in example prs
2025-03-09 08:06:06 +08:00
许杰友 Jieyou Xu (Joe) c37760a674
Merge pull request #2271 from rust-lang/tshepang-patch-1
fix text
2025-03-09 08:04:28 +08:00
许杰友 Jieyou Xu (Joe) fc8cb9cb6e
Merge pull request #2272 from rust-lang/tshepang-patch-2
compiletest directives: ignore-stage0 and only-stage0 do not exist
2025-03-09 08:03:57 +08:00
bors 321f5bab84 Auto merge of #137502 - compiler-errors:global-asm-aint-mir-body, r=oli-obk
Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes #137470
Fixes #137471
Fixes #137472
Fixes #137473

try-job: test-various
try-job: x86_64-apple-2
2025-03-08 22:23:45 +00:00
Tshepang Mbambo efa11d0d5c
ignore-stage0 and only-stage0 do not exist 2025-03-08 23:51:17 +02:00
Tshepang Mbambo 28b1ec7130
fix text
- There is more than just target and stage
- There is only 3 stages, so don't mention them specially
2025-03-08 22:58:09 +02:00
bors 78a809f780 Auto merge of #137500 - scottmcm:trunc-br, r=saethlin
Use `trunc nuw`+`br` for 0/1 branches even in optimized builds

Rather than needing to use `switch` for them to include the `unreachable` arm.
2025-03-08 19:01:10 +00:00
Tshepang Mbambo ebead304f4 link to latest major llvm update pr 2025-03-08 20:40:44 +02:00
Tshepang Mbambo fc6a11aeb4 only a few are needed as examples 2025-03-08 20:35:42 +02:00
Tshepang Mbambo 723b887eff numbers were not sequential, so stop trying 2025-03-08 20:33:05 +02:00
Deadbeef 79e42cfb0b consider `explicit_implied_const_bounds` 2025-03-08 16:38:44 +08:00
bors 639cedefe3 Auto merge of #138205 - onur-ozkan:fix-build-cycle, r=jieyouxu
handle precompiled compiler more properly

Fixes the build cycle problem reported on [#t-infra/bootstrap > Cycle on &#96;aarch64-apple&#96;](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Cycle.20on.20.60aarch64-apple.60/with/504231609).
2025-03-08 06:25:04 +00:00
bors 105390dba5 Auto merge of #138202 - jhpratt:rollup-kqrl5xn, r=jhpratt
Rollup of 12 pull requests

Successful merges:

 - #137337 (Add verbatim linker to AIXLinker)
 - #137363 (compiler: factor Windows x86-32 ABI impl into its own file)
 - #137537 (Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do)
 - #137606 (add a "future" edition)
 - #137957 (Remove i586-pc-windows-msvc)
 - #138000 (atomic: clarify that failing conditional RMW operations are not 'writes')
 - #138013 (Add post-merge analysis CI workflow)
 - #138033 (rustdoc: Add attribute-related tests for rustdoc JSON.)
 - #138137 (setTargetTriple now accepts Triple rather than string)
 - #138173 (Delay bug for negative auto trait rather than ICEing)
 - #138184 (Allow anyone to relabel `CI-spurious-*`)
 - #138187 (remove clones)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-08 03:19:34 +00:00
Jacob Pratt 3b547b8af9
Rollup merge of #138187 - matthiaskrgr:rmclone, r=cjgillot
remove clones
2025-03-07 21:57:54 -05:00
Jacob Pratt 71f6da3d90
Rollup merge of #138184 - thaliaarchi:unauthenticated-ci-spurious, r=compiler-errors
Allow anyone to relabel `CI-spurious-*`

As suggested by `@Noratrieb` in reference to me attempting to set this label in https://github.com/rust-lang/rust/pull/136780#issuecomment-2707364425, allow unauthenticated users to relabel `CI-spurious-*`.
2025-03-07 21:57:54 -05:00
Jacob Pratt ca28c5aaae
Rollup merge of #138173 - compiler-errors:incoherent-negative-impl, r=oli-obk
Delay bug for negative auto trait rather than ICEing

Fixes #138149

r? oli-obk
2025-03-07 21:57:53 -05:00
Jacob Pratt bb31cbecd5
Rollup merge of #138137 - ZequanWu:fix-triple, r=cuviper
setTargetTriple now accepts Triple rather than string

https://github.com/llvm/llvm-project/pull/129868 updated `setTargetTriple`
2025-03-07 21:57:52 -05:00
Jacob Pratt 3e31e63a3a
Rollup merge of #138033 - obi1kenobi:pg/json-attrs-tests, r=aDotInTheVoid
rustdoc: Add attribute-related tests for rustdoc JSON.

Add rustdoc JSON tests covering the use of the following attributes:
- `#[non_exhaustive]` applied to enums, variants, and structs
- `#[must_use]`, both with and without a message
- `#[no_mangle]`, in both edition 2021 and 2024 (`#[unsafe(no_mangle)]`) flavors
- `#[export_name]`, also in both edition 2021 and 2024 flavors

Related to #137645; this is a subset of the attributes that `cargo-semver-checks` relies on and tests in its own test suite or in the test suites of its components such as `trustfall-rustdoc-adapter`.

Helps with #81359

r? `@aDotInTheVoid`
2025-03-07 21:57:52 -05:00
Jacob Pratt c0aa4af874
Rollup merge of #138013 - Kobzol:ci-post-merge-analysis, r=marcoieni
Add post-merge analysis CI workflow

This PR adds a post-merge analysis workflow, which was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Reporting.20test.20suite.20statistics.20after.20merge).

The workflow currently analyzes test suite results from bootstrap metrics. It downloads metrics for all known jobs in the parent and current (HEAD) commit, compares them and prints a truncated diff. It then posts this diff to the merged PR as a comment. Later I also want to add other statistics to the analysis, e.g. changes in CI/bootstrap step durations.

It can be tested locally e.g. using this:
```
cargo run --release --manifest-path src/ci/citool/Cargo.toml post-merge-report 3cb02729ab3c6583a3b1d1845c5e22b674f04b8d fd17deacce374a4185c882795be162e17b557050
```
This uses a slightly older commit as a parent, to have more results in the diff (normally the diff won't be so large).

CC `@jieyouxu`

r? `@marcoieni`
2025-03-07 21:57:51 -05:00
Jacob Pratt 5b8c2737f0
Rollup merge of #138000 - RalfJung:atomic-rmw, r=Amanieu
atomic: clarify that failing conditional RMW operations are not 'writes'

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

r? ``@Amanieu``
Cc ``@rust-lang/opsem`` ``@chorman0773`` ``@gnzlbg`` ``@briansmith``
2025-03-07 21:57:51 -05:00
Jacob Pratt e198638f2f
Rollup merge of #137957 - Noratrieb:no, r=wesleywiser
Remove i586-pc-windows-msvc

See [MCP 840](https://github.com/rust-lang/compiler-team/issues/840).

I left a specialized error message that should help users that hit this in the wild (for example, because they use it in their CI).

```
error: Error loading target specification: the `i586-pc-windows-msvc` target has been removed. Use the `i686-pc-windows-msvc` target instead.
       Windows 10 (the minimum required OS version) requires a CPU baseline of at least i686 so you can safely switch. Run `rustc --print target-list` for a list of built-in targets
```

``@workingjubilee`` ``@calebzulawski`` fyi portable-simd uses this target in CI, if you wanna remove it already before this happens
2025-03-07 21:57:50 -05:00
Jacob Pratt dac70c87e4
Rollup merge of #137606 - davidtwco:next-edition, r=traviscross,ehuss
add a "future" edition

This idea has been discussed previously [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/Continuous.20edition-like.20changes.3F/near/432559262) (though what I've implemented isn't exactly the "next"/"future" editions proposed in that message, just the "future" edition). I've found myself prototyping changes that involve edition migrations and wanting to target an upcoming edition for those migrations, but none exists. This should be permanently unstable and not removed.
2025-03-07 21:57:49 -05:00
Jacob Pratt b423d96e40
Rollup merge of #137537 - jieyouxu:daily-rmake, r=Kobzol
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do

Addresses (mostly) #137532.
Follow-up to #137373.

### Summary

- Fix 3 run-make tests that currently use unstable features:
    1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that.
    2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic.
    3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by #137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta.
- Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`.

- The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide.
- This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could.

r? `@Kobzol`

try-job: x86_64-msvc-1
try-job: x86_64-mingw-1

[`os_pipe`]: https://github.com/oconnor663/os_pipe.rs

[^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed.
[^pipe-stab]: In-progress stabilization PR over at https://github.com/rust-lang/rust/pull/135822.
2025-03-07 21:57:49 -05:00
Jacob Pratt b325706ebd
Rollup merge of #137363 - workingjubilee:untangle-x86-abi-impl, r=jieyouxu
compiler: factor Windows x86-32 ABI impl into its own file

While it shares more than zero code with the SysV x86-32 ABI impl, there is no particular reason to organize wildly different ABIs using if-else in the same function.
2025-03-07 21:57:48 -05:00
Jacob Pratt 949237f76a
Rollup merge of #137337 - dalvescb:master, r=petrochenkov
Add verbatim linker to AIXLinker

This adds support for the "verbatim" native link modifier on AIX, will successfully pass the `native-link-modifier-verbatim-linker test case`
2025-03-07 21:57:47 -05:00
许杰友 Jieyou Xu (Joe) 93eca2b494 Document that `rmake.rs`/`run-make-support` may not use unstable features 2025-03-07 19:09:41 +08:00
bors 97de6349ae Auto merge of #138039 - onur-ozkan:handle-forced-compiler-on-tools, r=jieyouxu
handle forced compiler and revert #137476

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

I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`

try-job: dist-powerpc64le-linux
2025-03-06 17:20:24 +00:00
许杰友 Jieyou Xu (Joe) 3684751c90
Merge pull request #2269 from moxian/patch-1
Don't suggest explicitly `cfg`-gating `trace!` calls in bootstrap
2025-03-06 17:30:16 +08:00