Rollup of 15 pull requests#158416
Conversation
…impl Send + dyn Trait Add a regression test covering the case where a type uses PhantomData<*mut ()> to opt out of Sync, restores Send via an unsafe impl, and is then captured across an .await point with a trait object type parameter (Box<dyn Trait>). The compiler currently erases lifetimes in MIR coroutine witnesses, losing the 'static bound needed to apply the unsafe impl Send. The test verifies this is fixed by -Zhigher-ranked-assumptions and documents the PhantomData<Cell<()>> workaround as a comparison. See the PR description for links to the relevant issues. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There will still be one for things that aren't just scalars or scalar pairs.
Co-authored-by: Jesus Checa <101630491+jchecahi@users.noreply.github.com>
When emitting a `memcpy` for a scalable vector, the size computed by rustc (`num_vectors * element_count * element_ty`), since rust-lang#157915, needs to be multiplied by `vscale`.
…ity.md The sentence in `src/doc/unstable-book/src/compiler-flags/default-visibility.md` contained the misspelling "earier" where "earlier" was meant. ``` -shared objects earier in the load order. +shared objects earlier in the load order. ``` This is detected by the project's typos configuration; `./x test tidy --extra-checks=spellcheck` would flag it on the next run. Signed-off-by: Dodothereal <129273127+Dodothereal@users.noreply.github.com>
The new normalization regex is taken from many existing test cases, see: https://github.com/search?q=repo%3Arust-lang%2Frust+%2Fthread+%27rustc%27%5C.%5C*panicked%2F&type=code which includes files such as `tests/ui/treat-err-as-bug/span_delayed_bug.rs` or `tests/ui/treat-err-as-bug/err.rs`
This reverts commit 48e7c28.
…bjorn3 export symbols: support macos/windows(32/64) Previously, in the pr rust-lang#150992 , export symbols only supported Linux. The special prefix and suffix rules for some symbols in macOS and Windows were not fully supported. This pull request attempts to clarify these rules and add corresponding support. Currently, the `undecorate_c_symbol()` function has been added to handle macOS `_` prefixes, Windows x86 calling convention modifiers (cdecl/stdcall/fastcall/vectorcall), and Arm64EC `#` prefixes. *Update: Handling of Windows C++ mangled symbols has now been added(Linux/macOS don't need). r? @bjorn3 @petrochenkov
…scale, r=mati865 codegen_ssa: multiply scalable vec size by `vscale` Part of rust-lang/stdarch#2160. When emitting a `memcpy` for a scalable vector, the size computed by rustc (`num_vectors * element_count * element_ty`), since rust-lang#157915, needs to be multiplied by `vscale`.
…, r=notriddle Fix bug when rustdoc "go to only result" setting is not working as expected" Can be reproduced as follows on `std` docs: * Disable the `Directly go to item in search if there is only one result` setting * Search for "var" (without the quotes) * Enable the `Directly go to item in search if there is only one result` setting * Reload the page * It now goes to another page although there are more than one result. Thanks @poliorcetics for the detailed steps. :) The problem is that, we don't necessarily create the tabs in one particular order and if **any** tab has exactly one result, in some cases, it's good enough for the feature. So this PR adds a check to ensure it's only taken into consideration in the first tab, ignoring the other two. cc @lolbinarycat r? @notriddle
…lfJung Use `transmute_neo` in `assume_init` I noticed this basically open-coding a transmute via `read`, but now that we have a transmute that doesn't fail there on the typeck size check I figured that we might as well use it here. The Miri errors are preserved (at least locally, but CI will double-check) so hopefully this is ok. r? @RalfJung as the author of rust-lang#143327 Context is that I saw the raw-ref-cast-and-read in https://github.com/rust-lang/rust/pull/158341/changes#diff-ee00b0dbbebae9c10bf879a79377c87a7a68208a7e213d6ca792a6ef5f216855R87-R90 and thought it could be simpler 🙂
…anieu std: abort when `resume_unwind` is called inside the panic hook `resume_unwind` neglected to check the result from the `panic_count::increase`. This led to both `resume_unwind` unwinding after a `always_abort` and to an irreversible increase of the panic count if it is called inside a panic hook (since both the original panic and `resume_unwind` increase the panic count, but only one unwind occurs and so `catch_unwind` is only able to undo one of the count increases).
…folkertdev disallow tail calling extern "rust-call" functions r? folkertdev Following discussion from rust-lang#158248. Fixes rust-lang#158017 Closes rust-lang#158248
…bootstrap-change, r=folkertdev Revert "rebuild LLVM when `bootstrap.toml` config changes" This reverts commit 48e7c28. Turns out that currently this change makes perf a lot worse, see rust-lang#157836 (comment). cc @panstromek @Kobzol r? @ghost
…ait-test-phantomdata-rawptr, r=jackh726 Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait Add a regression test for rust-lang#154397, covering the case where: - A type uses `PhantomData<*mut ()>` to opt out of `Sync` - `Send` is restored via `unsafe impl<T: Send + 'static> Send` - The type is captured across an `.await` in an async block - The type parameter is a trait object (`Box<dyn Trait>`) This is an instance of rust-lang#110338. The test includes both revisions: - `assumptions`: compiles with `-Zhigher-ranked-assumptions` (check-pass) - `no_assumptions`: documents the current failure as a known-bug Also includes a `PhantomData<Cell<()>>` comparison showing the workaround compiles in all cases.
autodiff: stop always needing an alloca There will still be one for things that aren't just scalars or scalar pairs. r? @ZuseZ4 cc rust-lang#153250 (the tracking issue for removing intrinsic allocas)
…i-obk autodiff - typtree cleanups In [some recent experiments](https://github.com/rust-lang/rust/pull/157994/changes) I managed to lower more MIR information to LLVM to help Enzyme compile a test case that was previously failing. That PR became a little bigger, and we might want to add even more code. To get started I split it out of mod.rs, since that file is already 2.4k loc. In the process, I also fix some checks and deleted `typetree_from_ty_impl` and `typetree_from_ty_inner`, since they don't do much. r? oli-obk (noticed a regression in a test, marking as draft for now.)
…ult-visibility-earier-typo, r=wesleywiser doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag ## Summary Fix a small typo (`earier` → `earlier`) in the unstable-book documentation for the `-Zdefault-visibility` flag. This is detected by the project's typos configuration (`./x test tidy --extra-checks=spellcheck`) and would emit a CI warning on the next run. ## Diff ```diff -using `-Zdefault-visibility=interposable` will cause symbols to be emitted with "default" -visibility. On platforms that support it, this makes it so that symbols can be interposed, which -means that they can be overridden by symbols with the same name from the executable or by other -shared objects earier in the load order. +using `-Zdefault-visibility=interposable` will cause symbols to be emitted with "default" +visibility. On platforms that support it, this makes it so that symbols can be interposed, which +means that they can be overridden by symbols with the same name from the executable or by other +shared objects earlier in the load order. ``` ## AI assistance This patch was drafted with the help of an AI coding assistant, then reviewed line-by-line before submission. This is the only change in the diff.
Make normalization in a test case resilient to dist compilation This fixes rust-lang#158219 by adapting the `tests/rustdoc-ui/ice-bug-report-url` test case such that it will no longer fail with the remapping prefixes from rust-lang#150110 This was previously sometimes the first test failure if someone tried `x.py test` on a compiler checkout configured with `dist` setup, prominently featuring the new (mismatching) test `stdout` containing the scary ICE error message. --- The new normalization regex is taken from many existing test cases, see: [↝ this code search ⮺](https://github.com/search?q=repo%3Arust-lang%2Frust+%2Fthread+%27rustc%27%5C.%5C*panicked%2F&type=code) which includes files such as [`tests/ui/treat-err-as-bug/span_delayed_bug.rs`](https://github.com/rust-lang/rust/blob/4429659e4745016bd3f26a4a421843edc7fbc422/tests/ui/treat-err-as-bug/span_delayed_bug.rs#L4) or [`tests/ui/treat-err-as-bug/err.rs`](https://github.com/rust-lang/rust/blob/4429659e4745016bd3f26a4a421843edc7fbc422/tests/ui/treat-err-as-bug/err.rs#L4).
Reorganize `tests/ui/issues` [14/N] Part of [GSoC'26 project](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Reorganizing.20tests.2Fui.2Fissues) r? Kivooeo @Teapot4195
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 15 pull requests Successful merges: - #155535 (export symbols: support macos/windows(32/64)) - #158253 (codegen_ssa: multiply scalable vec size by `vscale`) - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected") - #158345 (Use `transmute_neo` in `assume_init`) - #158369 (std: abort when `resume_unwind` is called inside the panic hook) - #158374 (disallow tail calling extern "rust-call" functions) - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes") - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait) - #157181 (autodiff: stop always needing an alloca) - #158278 (autodiff - typtree cleanups) - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag) - #158318 (Make normalization in a test case resilient to dist compilation) - #158338 (Reorganize `tests/ui/issues` [14/N]) - #158343 (Include `Item::const_stability` info in rustdoc JSON.) - #158390 (Fix: auto trait, const trait bound)
|
💔 Test for 9e0d5a8 failed: CI. Failed job:
|
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing fa36a47 (parent) -> bd08c9e (this PR) Test differencesShow 281 test diffsStage 1
Stage 2
Additionally, 190 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard bd08c9e71874a81670fe3938dbf85148e42c2b96 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
📌 Perf builds for each rolled up PR:
previous master: fa36a479e4 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (bd08c9e): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -3.1%, secondary -4.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -4.1%, secondary -4.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 506.998s -> 484.801s (-4.38%) |
|
Whoa, some enormous perf wins for cycles/wall-time/max-rss! Not at all clear to me which PR is the cause. |
View all comments
Successful merges:
vscale#158253 (codegen_ssa: multiply scalable vec size byvscale)transmute_neoinassume_init#158345 (Usetransmute_neoinassume_init)resume_unwindis called inside the panic hook #158369 (std: abort whenresume_unwindis called inside the panic hook)bootstrap.tomlconfig changes" #158380 (Revert "rebuild LLVM whenbootstrap.tomlconfig changes")tests/ui/issues[14/N] #158338 (Reorganizetests/ui/issues[14/N])Item::const_stabilityinfo in rustdoc JSON. #158343 (IncludeItem::const_stabilityinfo in rustdoc JSON.)r? @ghost
Create a similar rollup