Commit Graph

303456 Commits

Author SHA1 Message Date
Jakub Beránek
245d2c95b1 Implement check::Compiletest using the tool_check_step macro 2025-07-19 20:56:04 +02:00
Jakub Beránek
bb46b8cf6a Allow selecting check tool Mode based on Builder 2025-07-19 20:56:04 +02:00
bors
0d95920262 Auto merge of #144172 - lqd:revert-144013, r=petrochenkov
Prepare revert of 144013

This is a possible revert for rust-lang/rust#144013 causing issue rust-lang/rust#144168 (imo p-crit) to give us time to figure out a correct fix for rust-lang/rust#144013 without pressure. Feel free to close if it's an easy fix instead: r? `@petrochenkov`
2025-07-19 18:20:39 +00:00
Josh Triplett
41199f39d8 available_parallelism: Add documentation for why we don't look at ulimit 2025-07-19 11:17:38 -07:00
Martin Nordholts
e1d4f2a0c2 tests: Require run-fail ui tests to have an exit code (SIGABRT not ok)
And introduce two new directives for ui tests:
* `run-crash`
* `run-fail-or-crash`

Normally a `run-fail` ui test like tests that panic shall not be
terminated by a signal like `SIGABRT`. So begin having that as a hard
requirement.

Some of our current tests do terminate by a signal/crash however.
Introduce and use `run-crash` for those tests. Note that Windows crashes
are not handled by signals but by certain high bits set on the process
exit code. Example exit code for crash on Windows: `0xc000001d`.
Because of this, we define "crash" on all platforms as "not exit with
success and not exit with a regular failure code in the range 1..=127".

Some tests behave differently on different targets:
* Targets without unwind support will abort (crash) instead of exit with
  failure code 101 after panicking. As a special case, allow crashes for
  `run-fail` tests for such targets.
* Different sanitizer implementations handle detected memory problems
  differently. Some abort (crash) the process while others exit with
  failure code 1. Introduce and use `run-fail-or-crash` for such tests.
2025-07-19 18:44:07 +02:00
Ralf Jung
d3fc02caf5 non-deterministically truncate reads/writes 2025-07-19 18:43:13 +02:00
Alisa Sireneva
5b2c61edbe Document guarantees of poisoning
This mostly documents the current behavior of `Mutex` and `RwLock` as
imperfect. It's unlikely that the situation improves significantly in
the future, and even if it does, the rules will probably be more
complicated than "poisoning is completely reliable", so this is a
conservative guarantee.

We also explicitly specify that `OnceLock` never poisons, even though it
has an API similar to mutexes.
2025-07-19 19:25:59 +03:00
Timo
72243f469d Fix missing_inline_in_public_items FP on functions with extern (#15313)
Closes rust-lang/rust-clippy#15301

changelog: [`missing_inline_in_public_items`] fix FP on functions with
`extern`
2025-07-19 16:25:13 +00:00
yanglsh
75811dfb66 fix: missing_inline_in_public_items FP on functions with extern 2025-07-20 00:00:04 +08:00
许杰友 Jieyou Xu (Joe)
a8daf4cff1 Rollup merge of #144180 - lqd:fix-typo, r=jieyouxu
fix load-bearing typo

Trying to see if this is enough to fix PR CI. How did it land without issues is a question for later.

<sub>I can see the headlines already, "billion dollar infrastructure brought down by load-bearing typo".</sub>
2025-07-19 23:44:15 +08:00
许杰友 Jieyou Xu (Joe)
a6b625c903 Rollup merge of #144178 - GuillaumeGomez:fix-clippy-lints, r=fmease
Fix clippy lints in librustdoc
2025-07-19 23:44:14 +08:00
许杰友 Jieyou Xu (Joe)
d0b677d5d9 Rollup merge of #144152 - ChrisDenton:optional-job, r=Kobzol
Rename `optional-mingw-check-1` to `optional-pr-check-1`

I noticed this when doing a `bors2 try` for `mingw`.

I also changed it to use the `pr-check-1` image as `mingw-check-1` no longer exists.
2025-07-19 23:44:14 +08:00
许杰友 Jieyou Xu (Joe)
a748a435e4 Rollup merge of #144149 - reallesee:master, r=Noratrieb
docs: update link to RISC-V and Xtensa installation guide

Replace outdated link https://docs.esp-rs.org/book/installation/riscv-and-xtensa.html with the official Espressif documentation at https://docs.espressif.com/projects/rust/book/installation/index.html
2025-07-19 23:44:13 +08:00
许杰友 Jieyou Xu (Joe)
c021ea8211 Rollup merge of #143960 - hkBst:tidy-cleanup-2, r=Mark-Simulacrum
Tidy cleanup 2
2025-07-19 23:44:13 +08:00
Rémy Rakic
4ef92bec5a fix load-bearing typo 2025-07-19 15:17:04 +00:00
Guillaume Gomez
c75edc982c Fix clippy lints in librustdoc 2025-07-19 16:20:47 +02:00
usamoi
fe42025122 update Atomic*::from_ptr and Atomic*::as_ptr docs 2025-07-19 22:17:32 +08:00
bors
f63685ddf3 Auto merge of #143641 - Kobzol:tool-target, r=jieyouxu
Add `ToolTarget` to bootstrap

Oh, you thought I'm done with refactoring bootstrap tools? Na-ah, think again! After the failure of https://github.com/rust-lang/rust/pull/143581, `ToolTarget` is back with a vengeance. This time, I implemented the test changes and tool cleanups without forcing these tools to be built with the stage0 compiler.

There are still some small wins though, `LlvmBitcodeLinker` now starts at stage 1, and not stage 2. Cargo should also be ported to this new mode, but I'm leaving that for a follow-up PR.

Hopefully X-th time's the charm 🤞

r? `@jieyouxu`
2025-07-19 14:09:56 +00:00
Ralf Jung
627c031ce7 Merge pull request #4482 from RalfJung/deps
update dependencies
2025-07-19 13:52:23 +00:00
Ralf Jung
8acdee7bab don't halt execution when we write to a read-only file 2025-07-19 15:39:04 +02:00
Folkert de Vries
58c00f3b71 fix collapsable_else_if when the inner if is in parens 2025-07-19 15:35:31 +02:00
Ralf Jung
6a67a34b73 move and update test dependencies 2025-07-19 15:27:29 +02:00
Alex Macleod
fd7076bd00 Fix filter_map_bool_then wrongly suggests macro definitions (#15048)
Closes rust-lang/rust-clippy#15047

changelog: [`filter_map_bool_then`] fix wrongly showed macro definitions
in suggestions
2025-07-19 12:34:23 +00:00
llogiq
17968e7585 Fix needless_range_loop FP on array literals (#15314)
Closes rust-lang/rust-clippy#15309

changelog: [`needless_range_loop`] fix FP on array literals
2025-07-19 12:34:07 +00:00
Alex Macleod
f85cdbbd6f Simplify must_use_candidate spans (#15310)
This is blocking rust-lang/rust-clippy#14724

changelog: none
2025-07-19 12:24:02 +00:00
Alex Macleod
b916841ccc Remove unused option None for LEVEL_FILTERS_DEFAULT (#15315)
Take to account that we don't have lints under under `None` for
`LEVEL_FILTERS_DEFAULT` so far
https://rust-lang.github.io/rust-clippy/master/index.html?levels=none,
we can remove it.

changelog: none
2025-07-19 12:20:34 +00:00
LorrensP-2158466
5a5027aba0 Move float non determinism helpers to math.rs 2025-07-19 14:17:05 +02:00
Ralf Jung
6ce164d1df ditch which dependency 2025-07-19 13:58:11 +02:00
Ralf Jung
f32ec588ad bump cargo-metadata 2025-07-19 13:58:10 +02:00
Ralf Jung
0b8f558cc9 bump ui_test 2025-07-19 13:58:09 +02:00
Ralf Jung
4bd80887d8 bump ipc-channel 2025-07-19 13:58:08 +02:00
Ralf Jung
bb79e79cd1 bump colored dep 2025-07-19 13:58:08 +02:00
Ralf Jung
c1242b794f cargo update 2025-07-19 13:58:06 +02:00
yanglsh
6cf00e9490 fix: needless_range_loop FP on array literals 2025-07-19 19:38:25 +08:00
Alexey Semenyuk
048a64a214 Remove unused option fir LEVEL_FILTERS_DEFAULT 2025-07-19 16:29:16 +05:00
bors
12865ffd0d Auto merge of #144166 - matthiaskrgr:rollup-wccepuo, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#141076 (fix Zip unsoundness (again))
 - rust-lang/rust#142444 (adding run-make test to autodiff)
 - rust-lang/rust#143704 (Be a bit more careful around exotic cycles in in the inliner)
 - rust-lang/rust#144073 (Don't test panic=unwind in panic_main.rs on Fuchsia)
 - rust-lang/rust#144083 (miri sleep tests: increase slack)
 - rust-lang/rust#144092 (bootstrap: Detect musl hosts)
 - rust-lang/rust#144098 (Do not lint private-in-public for RPITIT)
 - rust-lang/rust#144103 (Rename `emit_unless` to `emit_unless_delay`)
 - rust-lang/rust#144108 (Ignore tests/run-make/link-eh-frame-terminator/rmake.rs when cross-compiling)
 - rust-lang/rust#144115 (fix outdated comment)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-19 11:10:04 +00:00
Oli Scherer
1f15460173 Merge pull request #4480 from RalfJung/no-extra-rounding-error
add -Zmiri-no-extra-rounding-error to specifically disable just that part of float-nondet
2025-07-19 11:06:58 +00:00
Ralf Jung
4aa4376008 add -Zmiri-no-extra-rounding-error to specifically disable just that part of float-nondet 2025-07-19 12:30:42 +02:00
Rémy Rakic
9613ce02c3 Revert "resolve: Make disambiguators for underscore bindings module-local"
This reverts commit 998df3a3e8.
2025-07-19 09:30:39 +00:00
Laurențiu Nicola
e49e10736f Merge pull request #20258 from Young-Flash/remove_unused
minor: remove unused var
2025-07-19 08:30:24 +00:00
Ralf Jung
7672e4ed85 interpret: fix TypeId pointers being considered data pointers 2025-07-19 10:29:13 +02:00
Jakub Beránek
f16016ad25 Fix compiler for dist LLVM bitcode linker 2025-07-19 10:27:46 +02:00
Young-Flash
2f46cde9a4 minor: remove unused var 2025-07-19 16:19:20 +08:00
bors
83825dd277 Auto merge of #143784 - scottmcm:enums-again-new-ex2, r=dianqk
Simplify discriminant codegen for niche-encoded variants which don't wrap across an integer boundary

Inspired by rust-lang/rust#139729, this attempts to be a much-simpler and more-localized change while still making a difference.  (Specifically, this does not try to solve the problem with select-sinking, leaving that to be fixed by https://github.com/llvm/llvm-project/issues/134024 -- once it gets released -- instead of in rustc's codegen.)

What this *does* improve is checking for the variant in a 3+ variant enum when that variant is the type providing the niche.  Something like `if let Foo::WithBool(_) = ...` previously compiled to `ugt(add(x, -2), 2)`, which is non-trivial to think about because it's depending on the unsigned wrapping to shift the 0/1 up above 2.  With this PR it compiles to just `ult(x, 2)`, which is probably what you'd have written yourself if you were doing it by hand to look for "is this byte a bool?".

That's done by leaving most of the codegen alone, but adding a couple new special cases to the `is_niche` check.  The default looks at the relative discriminant, but in the common cases where there's no wraparound involved, we can just check the original value, rather than the offsetted one.

The first commit just adds some tests, so the best way to see the effect of this change is to look at the second commit and how it updates the test expectations.
2025-07-19 08:03:40 +00:00
Oli Scherer
eef454f89b Merge pull request #4478 from rust-lang/rustup-2025-07-19
Automatic Rustup
2025-07-19 07:05:43 +00:00
A4-Tacks
54d974324c Add Deref -> DerefMut for generate_mut_trait_impl 2025-07-19 15:01:13 +08:00
Matthias Krüger
cc699e1edf Rollup merge of #144115 - lcnr:auto-trait-comment, r=compiler-errors
fix outdated comment

cc rust-lang/rust#84857

r? types
2025-07-19 08:55:38 +02:00
Matthias Krüger
ae77628a53 Rollup merge of #144108 - CaiWeiran:run-make_test, r=jieyouxu
Ignore tests/run-make/link-eh-frame-terminator/rmake.rs when cross-compiling

The test tests/run-make/link-eh-frame-terminator/rmake.rs fails to link when cross-compiling. Therefore, it should be ignored in cross-compilation environments.
See [commit a27bdea](a27bdea4b7) and [commit 2beccc4](2beccc4d8e) for reference.
2025-07-19 08:55:37 +02:00
Matthias Krüger
bd23cd62f2 Rollup merge of #144103 - xizheyin:emit-unless, r=compiler-errors
Rename `emit_unless` to `emit_unless_delay`

`emit_unless` is very unintuitive and confusing. The first impression is as if it will only emit if the parameter is true, without the altnative "delay as a bug".

`emit_unless_delay` expresses two things:
1. emit unless the `delay` parameter is true
2. either *emit immediately* or *delay as bug*

r? `@compiler-errors`
2025-07-19 08:55:37 +02:00
Matthias Krüger
4b9471771b Rollup merge of #144098 - cjgillot:lint-rpitit, r=compiler-errors
Do not lint private-in-public for RPITIT

Fixes the hard error introduced by https://github.com/rust-lang/rust/pull/143357

Instead of trying to accept this hard error directly, this PR copies tests from https://github.com/rust-lang/rust/pull/144020 and removes the error.

If the behaviour is actually desirable, the second commit can be reverted with a proper crater run.

cc https://github.com/rust-lang/rust/issues/143531 for bookkeeping

r? `@compiler-errors`
2025-07-19 08:55:36 +02:00