Rollup of 17 pull requests#157683
Conversation
The `TypeOutlives` handler in `evaluate_predicate_recursively` means to check whether a type in a `T: 'a` predicate has free regions, bound regions, non-region inference variables, or non-region generic parameters -- and if so, to return `EvaluatedToOkModuloRegions` rather than `EvaluatedToOk`. Correspondingly, the comment says "no free lifetimes or generic parameters". But the code was mistakenly checking `has_non_region_infer()` twice instead of checking both `has_non_region_infer()` and `has_non_region_param()`. This meant that `TypeOutlives(T, 'static)` where `T` is a type parameter returned `EvaluatedToOk` -- claiming the result holds unconditionally -- when the correct answer is `EvaluatedToOkModuloRegions`. The distinction matters during marker trait winnowing in `prefer_lhs_over_victim`, which uses `must_apply_considering_regions()` (true only for `EvaluatedToOk`) to decide whether one impl beats another when there are multiple candidates. With the bug, a `T: 'static`-bounded impl appeared equally as strong as an unrestricted impl, making the winner depend on source order. This caused spurious E0310 errors when the more-constrained impl happened to appear after the less-constrained one. This fixes Rust issue 109481. See PR 153847. This same symptom was originally filed as issue 84917 and fixed in PR 88139. Then PR 102472 rewrote the `TypeOutlives` handler, introducing the duplicate `has_non_region_infer()` and losing the param check, regressing this. Around this same time, issue 109481 was filed. It noted the connection to PR 102472 -- that the bug only appeared after it -- but the duplicate condition was not noticed.
It's harder than one would imagine to demonstrate that the `has_non_region_infer()` check in the `TypeOutlives` handler is load bearing (even though the check seems right analytically). Fortunately, we did find a way to show this. Let's add that test. In working that out, we found two other interesting ways of showing that the `has_non_region_param()` check matters. Let's add those too. Though we're concerned here with code in the old solver, we test against both.
Since approx. Windows SDK 20348, the corresponding cdb (and/or its underlying WinDbg engine) changed or regressed the `OsStr`/`OsString` visualization, and no longer renders the emoji. Since approx. SDK/cdb 26100, the output formatting of the string containing UTF-8 (i.e. the multi-byte emoji grapheme) seems to have further regressed (e.g. the end quotation mark is no longer shown and command output becomes garbled). Relevant issues: * RUST-88840 * RUST-148743 * RUST-88796
The hand-written reader bootstrap.py uses to find the stage0 cargo and rustc only recognized `[table]` headers, so dotted keys like `build.cargo = "..."` were ignored. Parse the dotted prefix on each key as the table it belongs to, resolved relative to the enclosing section, and scope the cargo/rustc lookup to `[build]` so the Python and Rust sides agree.
…oad it from the per-owner info instead
This makes a few changes to rustc_public to make it a little easier to analyze ADT types. * It implements `CrateDef` and `CrateDefType` for `FieldDef`, which allows easy access to the underlying `DefId`, names, and tool annotations. * It adds `Crate::adts` to simplify stepping through all the ADTs in the crate. Note that I did use Gemini to assist with writing this patch, but I wrote most of it, reviewed all the vode, and verified the tests pass locally.
Moreover, flesh out the rustdoc book section about code block attributes.
* Fix async drop glue for Box<T> * Adress reviewer concerns * Address more concerns
Incorrect types can't cause unsafety and making it untyped will make it easier to get rid of the ProcMacro enum in the proc-macro ABI.
Instead encode this information in the crate metadata. This helps shrink the proc-macro ABI to just the parts necessary for transmitting raw bytes to perform RPC on top of.
…li-obk Change type of async context parameter after state transform. `Future::poll` expects a `&mut std::task::Context<'_>`. Meanwhile, async coroutines use `std::future::ResumeTy` as resume parameter. This is meant to workaround the limitations of borrowck, which cannot prove that coroutines implement `for<'a, 'b> CoroutineTrait<&'a mut Context<'b>>`. In the coroutine state transform, we need to change the signature from `ResumeTy` to the proper `&mut Context<'_>`. The current code attempts to find locals that have type `ResumeTy` to change their type. This is needlessly complex and relies on undocumented behaviour of the MIR builder. Instead, this PR proposes to replace the `ResumeTy` argument with a new local, with value `ResumeTy(transmute(context))`. Based on rust-lang#156875.
…keys, r=clubby789 bootstrap: Handle dotted table keys when parsing bootstrap.toml Fixes rust-lang#156948 `bootstrap.py` has a small hand-rolled reader that pulls the stage0 cargo and rustc out of `bootstrap.toml` before the real TOML parser is built. It only understood `[table]` headers, so the dotted form that `bootstrap.example.toml` now uses (`build.cargo = "..."`) was silently dropped, and the cargo/rustc lookup matched those keys in any table rather than only `[build]`. Teach the reader to strip an optional dotted prefix and treat it as the key's table, the same way `configure.py` does when it writes the file, and scope the cargo/rustc lookup to `[build]`. New tests cover the dotted form, equivalence with the section form, wrong-table rejection, and dotted target keys. *Disclosure: the code was written by AI (Claude); reviewed and tested by me.*
|
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) |
|
💔 Test for a498ff0 failed: CI. Failed job:
|
|
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) |
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
|
well past the point where this failed before @bors treeclosed- |
|
Tree is now open for merging. |
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 d56483a (parent) -> ab26b17 (this PR) Test differencesShow 53 test diffsStage 1
Stage 2
Additionally, 8 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 ab26b175979ee7b2cb3302dce204b99df96f7efb --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: d56483a91d In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (ab26b17): 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 0.5%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 1.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 525.47s -> 516.59s (-1.69%) |
View all comments
Successful merges:
tests/debuginfo/pretty-std.rsOsStringcdb check #157503 (Disabletests/debuginfo/pretty-std.rsOsStringcdb check)test_harnesscode block attribute #148183 (rustdoc: Test & documenttest_harnesscode block attribute)Literal::byte_character_valuework with bytes as well #157338 (MakeLiteral::byte_character_valuework with bytes as well)implrestriction rendering and add bottom margin #157633 (Reorderimplrestriction rendering and add bottom margin)casefoldAPIs #157652 (fix doc for unicode normalization faq oncasefoldAPIs)rustc_must_match_exhaustively#157668 (Add test for matches inrustc_must_match_exhaustively)Failed merges:
errors.rsfile todiagnostics.rs(4/N) #157670 (Renameerrors.rsfile todiagnostics.rs(4/N))r? @ghost
Create a similar rollup