Rollup of 18 pull requests - #161338
Conversation
Signed-off-by: Embers-of-the-Fire <stellarishs@163.com>
Add focused Miri coverage for the if-let closure capture change, demonstrating UB at closure construction when partial pattern capture reborrows dangling references. Assisted-by: OpenAI:gpt-5.5 Signed-off-by: Embers-of-the-Fire <stellarishs@163.com>
… orphan check
`emit_orphan_check_error` already special-cases non-local types that
appear in a foreign trait's own parameter position (as opposed to
Self): for Slice, Array, and Tuple, the label reads "this is
not defined in the current crate because this is a foreign trait"
instead of naming the type. The Adt arm and the primitive/catch-all
arm never checked this and always named the type instead, even in the
same non-Self position.
This produced a confusing diagnostic for impls like
impl PartialEq for u32 {}
where Rhs defaults to Self (u32), so both the Self label and
the Rhs label read `u32` is not defined in the current crate,
with the second one visually landing under PartialEq since the
defaulted Rhs has no span of its own.
Extend the existing is_foreign check to the Adt and catch-all arms
so all four cases behave consistently.
Addresses rust-lang#160648
This was already possible via `./x fix -- --allow-dirty`, but forwarding the argument from bootstrap is more user-friendly.
This commit is an initial implementation of the `FnPtr` trait as described in the `fn_static` tracking issue, which consists of moving the internally unstable `core::marker::FnPtr` to `core::ops::FnPtr`, as well as changing the API. Because `NonNull` is used in the new `as_ptr` signature, it was also turned into a proper lang item.
Rust only supports the windowed Xtensa calling convention on all upstream targets (esp32 family). Mark windowed and exception as ABI-required features so a mismatched -Ctarget-cpu cannot silently change the ABI. Discussion: rust-lang#160530 (comment)
Rust currently supports a single Xtensa ABI, so apply the same spec checks as wasm: unspecified llvm_abiname, no floatabi, no rustc_abi, and unspecified or other cfg_abi.
under the next solver a closure whose signature doesnt match emitted two errors at the same span. the trait goal `C: FnMut(&i32)` failed, and the `<C as FnOnce<..>>::Output == bool` projection goal resting on it failed out of that same unification. the old solver collapses both into a single `type mismatch in closure arguments`, so the projection error was noise. suppress a projection error when another error at the same span is a trait goal it rests on. ambiguity errors are exempt, they get merged into one diagnostic whose notes list every constraint the annotation has to satisfy, so their projections still say something the trait error doesnt.
elaborating `cond` reaches supertraits, so a projection resting on a supertrait got suppressed even when that supertrait holds and the projection had failed for its own reasons. that dropped a real error, on the old solver too. require the trait goal the projection rests on to be unproven before treating the trait error as covering it.
|
@bors r+ p=5 |
This comment has been minimized.
This comment has been minimized.
|
📣 Toolstate changed by #161338! Tested on commit 9ba81c2. 🎉 nomicon on windows: test-fail → test-pass (cc @JohnTitor @traviscross). |
Tested on commit rust-lang/rust@9ba81c2. Direct link to PR: <rust-lang/rust#161338> 🎉 nomicon on windows: test-fail → test-pass (cc @JohnTitor @traviscross). 🎉 nomicon on linux: test-fail → test-pass (cc @JohnTitor @traviscross).
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 19aa2d7 (parent) -> 9ba81c2 (this PR) Test differencesShow 1529 test diffsStage 1
Stage 2
Additionally, 1502 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 9ba81c26fe1be0c8730083a1b6da070bc7c51726 --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 |
|
Finished benchmarking commit (9ba81c2): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@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.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 456.445s -> 455.183s (-0.28%) |
|
📌 Perf builds for each rolled up PR:
parent commit: 19aa2d70ec In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Successful merges:
if letin closures #154210 (fix: fix the capture behavior ofif letin closures)FnPtrtrait #156176 (Initial implementation ofFnPtrtrait)InstantandSystemTimeon Hermit #161297 (std: use UNIX'sInstantandSystemTimeon Hermit)./x fix --allow-dirty#161220 (bootstrap: Allow./x fix --allow-dirty)rustc_thread_pool#161296 (Enable overflow checks inrustc_thread_pool)allow(non_camel_case_types)inminicore.rs#161309 (allow(non_camel_case_types)inminicore.rs)Read::byteshandling Interrupted errors #161318 (Doc: clarify howRead::byteshandling Interrupted errors)r? @ghost
Create a similar rollup