Repository navigation
Rollup of 8 pull requests - #164631
Closed
JonathanBrouwer wants to merge 30 commits into
Closed
Rollup of 8 pull requests#164631JonathanBrouwer wants to merge 30 commits into
JonathanBrouwer wants to merge 30 commits into
Conversation
We can reuse the test setup for other intrinsics, saving a bit of build time and repeated setup.
This isn't the most complicated function, but it currently isn't used anywhere in-tree (typically `intrinsics::abort` is used instead) and there are no examples or tests. Copy the examples from `abort` since this should behave similarly, and also cover it in an assembly test. We don't really need the assembly check for any guarantees but it is handy to reference what the intrinsic actually does, and will let us know if anything changes. I also added tests for `breakpoint` on more platforms since these were easy to do together.
…mpiler-flags=<flags>`
…Only` and fix docs
Use the constants from
…_detected` The available target feature set is the same for these architectures, so combine to a single macro. This matches what is done for x86, loongarch, and RISC-V.
…=JohnTitor core: Add examples and assembly tests for `abort_immediate` This isn't the most complicated function, but it currently isn't used anywhere in-tree (typically `intrinsics::abort` is used instead) and there are no examples or tests. Copy the examples from `abort` since this should behave similarly, and also cover it in an assembly test. We don't really need the assembly check for any guarantees but it is handy to reference what the intrinsic actually does, and will let us know if anything changes. I also added tests for `breakpoint` on more platforms since these were easy to do together. Tracking issue: rust-lang#154601
…-real-2, r=jieyouxu Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests Right now, it is [not possible](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Testing.20stable.20vs.20nightly.20behavior.20in.20UI.20tests/with/628206707) to test how the compiler behaves on the stable toolchain in UI tests. Even though rust-lang#132993 added a mechanism to emulate stable rustc on the nightly channel, using the `RUSTC_BOOTSTRAP=-1` environment variable, this mechanism is not currently usable within compiletest and UI tests directly, because compiletest unconditionally passes several unstable `-Z` flags that are load-bearing for the testing infra itself to work (notably `-Zui-testing` and friends). That is quite annoying, because we do in fact want to test stable behavior in a couple of tests, but today we have to write those as `run-make` tests (latest example: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Testing.20stable.20vs.20nightly.20behavior.20in.20UI.20tests/with/628206707), even if the tested situation is very simple. Those are harder to read, write and maintain than UI tests and they do not support blessing outputs as well as UI tests. Recently, I at least added rust-lang#163444 as a way of centralizing the logic of testing a stable `rustc` in a run-make test, but that does not really help with the fact that we still have to use run-make tests for it, even when a normal UI test would do. For rust-lang#162848, I would also like to have a way of passing `-Zthreads=1` to all run-make tests, even if they are testing stable `rustc`, but that's not easily possible, because those tests are using `RUSTC_BOOTSTRAP=-1`. This PR proposes to add a new mode to `RUSTC_BOOTSTRAP`, with the value of `-allow-unstable-compiler-flags=<flags>`. This can be used to emulate the behavior of stable rustc, while still allowing passing *specific* unstable flags to the compiler. The stability check in the compiler is thus now separated into two questions: - Are we an unstable/nightly build? - Can we accept specific unstable compiler flags? The latter is checked only at a few places, so the necessary change to the compiler is rather small (IMO). To demonstrate how this would be used, I also implemented a new directive into compiletest in this PR, `act-as-stable`. That can be used in a UI test to emulate stable rustc. Some tests before used `only-stable` to "achieve" this, which is very misleading, because it doesn't work at all 😆, due to compiletest unconditionally passing `RUSTC_BOOTSTRAP=1` to all executed tests. `act-as-stable` fixes that. The last two commits demonstrate how we could replace run-make tests that tested different output on stable/nightly with UI tests. I suppose that this mode might be interesting for other people outside of `rust-lang/rust`, but if you don't want that, I can gate it behind `-Zui-testing`. r? jieyouxu
…ination, r=tmiasko MIR move elimination [4/6]: MoveElimination Depends on rust-lang#163336 and rust-lang#163337 This PR implements the `MoveElimination` pass from rust-lang/rfcs#3943. This pass uses the analysis results from `PreciseLiveness` to unify locals that are related by an assignment. This also includes an alias-fixup pass which is needed because some rvalues don't allow sources to overlap with the destination place. The pass is only enabled under `-Zmir-move-elimination`. This flag also disables `DestinationPropagation`, which is superseded by the new pass. r? tmiasko
add ReadDir::dir to get the directory handle of the underlying directory Tracking issue: rust-lang#120426 r? @the8472 Fixes rust-lang/miri#5326
…e, r=programmerjake std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected` The available target feature set is the same for these architectures, so combine to a single macro. This matches what is done for x86, loongarch, and RISC-V. The first commit just turns some magic numbers into constants. Tracking issue: rust-lang#111191 Related: rust-lang#150255
…t, r=oli-obk layout invariant: turn delayed bug back into proper assertion This got changed in rust-lang#149433 but that was a mistake. The compiler relies on this invariant internally, so we can't just delay_bug this -- we have to prevent bogus layouts from reaching other parts of the compiler such as the interpreter. This re-opens rust-lang#144501. The proper fix for that issue is to taint the type due to its invalid attributes, so that the rest of the compiler does not try to mess with it. r? @scottmcm
…d, r=Urgau rustdoc: Correctly handle inner `deprecated` attribute on modules Fixes rust-lang#164459. Similar cause and fix as what was fixed by rust-lang#162862. r? @Urgau
arch::breakpoint: avoid confusing 'equivalent' terminology Cc @tgross35 @joshtriplett
Member
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
Rollup of 8 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-aarch64-apple-2 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu try-job: test-x86_64-gnu-llvm-22-3
Contributor
|
⌛ Testing commit d6df0fb with merge cca254c... Workflow: https://github.com/rust-lang/rust/actions/runs/39422046163 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
…uwer Rollup of 8 pull requests Successful merges: - #163575 (core: Add examples and assembly tests for `abort_immediate`) - #163664 (Add new `RUSTC_BOOTSTRAP=-allow-unstable-compiler-flags` mode for testing stable compiler behavior in UI tests) - #163338 (MIR move elimination [4/6]: MoveElimination) - #163701 (add ReadDir::dir to get the directory handle of the underlying directory) - #164612 (std: Combine `is_powerpc64_feature_detected` into `is_powerpc_feature_detected`) - #164509 (layout invariant: turn delayed bug back into proper assertion) - #164594 (rustdoc: Correctly handle inner `deprecated` attribute on modules) - #164629 (arch::breakpoint: avoid confusing 'equivalent' terminology)
Contributor
|
This pull request was unapproved due to being closed. Auto build was cancelled due to the PR being closed. Cancelled workflows: |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 2345e16 failed: CI. Failed jobs:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
abort_immediate#163575 (core: Add examples and assembly tests forabort_immediate)RUSTC_BOOTSTRAP=-allow-unstable-compiler-flagsmode for testing stable compiler behavior in UI tests #163664 (Add newRUSTC_BOOTSTRAP=-allow-unstable-compiler-flagsmode for testing stable compiler behavior in UI tests)is_powerpc64_feature_detectedintois_powerpc_feature_detected#164612 (std: Combineis_powerpc64_feature_detectedintois_powerpc_feature_detected)deprecatedattribute on modules #164594 (rustdoc: Correctly handle innerdeprecatedattribute on modules)r? @ghost
Create a similar rollup