Rollup of 31 pull requests#157739
Conversation
On some platforms, it looks like these are not currently Send/Sync. We have a negative impl in env/common.rs. This is a breaking change on a bunch of targets, but it makes it less likely that someone unintentionally/accidentally depends on this. This is a potentially partial list but should be fairly complete: aarch64-unknown-none, aarch64-unknown-none-softfloat, armv7a-none-eabi, armv7a-none-eabihf, armv7r-none-eabi, armv7r-none-eabihf, armv8r-none-eabihf, loongarch64-unknown-none, loongarch64-unknown-none-softfloat, nvptx64-nvidia-cuda, riscv32i-unknown-none-elf, riscv32im-unknown-none-elf, riscv32imac-unknown-none-elf, riscv32imafc-unknown-none-elf, riscv32imc-unknown-none-elf, riscv64gc-unknown-none-elf, riscv64imac-unknown-none-elf, s390x-unknown-none-softfloat, thumbv6m-none-eabi, thumbv7a-none-eabi, thumbv7a-none-eabihf, thumbv7em-none-eabi, thumbv7em-none-eabihf, thumbv7m-none-eabi, thumbv7r-none-eabi, thumbv7r-none-eabihf, thumbv8m.base-none-eabi, thumbv8m.main-none-eabi, thumbv8m.main-none-eabihf, thumbv8r-none-eabihf, wasm32-unknown-unknown, wasm32v1-none, x86_64-unknown-none
When a `&mut`-typed value is moved out of a closure via a `for` loop's implicit `into_iter`, borrowck suggests "consider creating a fresh reborrow" (`&mut *place`) with `Applicability::MachineApplicable`. For a value captured by an `Fn` closure -- which holds its captures through `&self` -- that place cannot be borrowed mutably (E0596), so applying the machine-applicable suggestion produces code that does not compile. Gate the suggestion on borrowck's own `is_mutable` check for the reborrowed place, so it is only offered where `&mut *place` is valid: suppressed for `Fn`-closure captures, still offered for `FnMut` closures and ordinary `&mut` locals.
WF-checking walks through higher-ranked binders without instantiating them, so a `dyn Trait` nested inside a `for<'a>` bound reaches the `ty::Dynamic` arm of `WfPredicates::visit_ty` while still carrying escaping bound vars. Feeding that type into `ExistentialTraitRef::with_self_ty` violated its no-escaping-self precondition and tripped the assertion that guards it. The trait ref built there is only used to read off `ConstArgHasType` clauses, which constrain the trait's own const arguments and never mention the `Self` type. Substitute a fresh placeholder self type when the real one escapes: the assertion holds and the const-argument check is still performed. Re-enable the `with_self_ty` debug assertion now that its precondition is upheld.
One test covers the original ICE (a `dyn Trait` nested in a `for<'a>` bound, distilled from itertools). The other locks in that a const argument on such a nested `dyn` is still type-checked, so the placeholder-self-type fix cannot silently regress into dropping the `ConstArgHasType` check.
…projection normalization
The in-memory dep graph kept for `-Zquery-dep-graph` is built by `GraphEncoder::record`, which pushed each node using `try_lock` and silently dropped the node when the lock was contended. Single-threaded the only contention is a query forced re-entrantly from within `with_retained_dep_graph`, so dropping was harmless. Under the parallel frontend several encoder threads record nodes at the same time, so a contended `try_lock` dropped nodes and edges at random, leaving the retained graph nondeterministic and making the dep-graph ui tests, which assert on its contents, fail intermittently. Remove that reentrancy in `check_paths`: read the graph into owned results while the lock is held, then emit the diagnostics afterwards. The only query forced inside the old closure was `def_path_str` (for the error messages), which can create dep nodes and re-enter the encoder; doing the emission after the lock is released means `record` never re-enters while the lock is held. `record` can then block on the lock unconditionally instead of using `try_lock`, so concurrent encoders never drop a node or edge. This only affects compilation with `-Zquery-dep-graph`; with the flag off the retained graph is absent and nothing changes.
These tests assert on the contents of the retained dep graph, which is now built deterministically under the parallel frontend, so they no longer need to be ignored there. Replace the ignore-parallel-frontend directives with blank lines rather than deleting them, so the following line numbers stay the same and the expected output is unchanged.
And rename a struct field.
This gets rid of the `printable.py` script, ensuring that `unicode-table-generator` handles all our Unicode data table generation needs. I've elected to give each Unicode property its own table, instead of merging them all into one. This is slightly less efficient in terms of space, but should allow us to expose these tables in the future with public methods on `char`.
These characters may be hidden/invisible otherwise.
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 485ec3f (parent) -> 32cfe53 (this PR) Test differencesShow 933 test diffsStage 0
Stage 1
Stage 2
(and 17 additional test diffs) Additionally, 816 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 32cfe53009803b85afd40ff72768bb058e9936f0 --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: 485ec3fbcc In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (32cfe53): 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 -2.8%, secondary 1.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 1.9%, secondary -3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 517.006s -> 518.719s (0.33%) |
Rollup of 31 pull requests Successful merges: - rust-lang#141030 (Expand free alias types during variance computation) - rust-lang#154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - rust-lang#155527 (Replace printables table with `unicode_data.rs` tables) - rust-lang#156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - rust-lang#157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - rust-lang#157282 (Fix post-monomorphization error note race in the parallel frontend) - rust-lang#157352 (Make the retained dep graph deterministic under the parallel frontend) - rust-lang#157601 (Emit error for unused target expression in glob and list delegations) - rust-lang#157611 (Update `browser-ui-test` version to `0.24.0`) - rust-lang#157620 (Add a strategy FnMut to inject behavior into the flush cycle) - rust-lang#157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - rust-lang#157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - rust-lang#157647 (Start using comptime for reflection intrinsics and their wrapper functions) - rust-lang#157719 (resolve: Partially revert "Remove a special case for dummy imports") - rust-lang#155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - rust-lang#155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - rust-lang#155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - rust-lang#156497 (fix-155516: Don't suggest wrong unwrap expect) - rust-lang#156583 (Support defaults for static EIIs) - rust-lang#157013 (Ensure inferred let pattern types are well-formed) - rust-lang#157196 (Only suggest reborrowing a moved value where the reborrow is valid) - rust-lang#157230 (borrowck: avoid ICE describing fields on generic params) - rust-lang#157288 (platform support: add SNaN erratum to MIPS targets) - rust-lang#157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - rust-lang#157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - rust-lang#157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - rust-lang#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - rust-lang#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - rust-lang#157691 (Move symbol hiding code to a new file) - rust-lang#157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - rust-lang#157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - rust-lang#157699 (Arg splat experiment - hir FnDecl impl)
Rollup of 31 pull requests Successful merges: - rust-lang#141030 (Expand free alias types during variance computation) - rust-lang#154853 (mgca: Register `ConstArgHasType` when normalizing projection consts) - rust-lang#155527 (Replace printables table with `unicode_data.rs` tables) - rust-lang#156629 (Stabilize `core::range::{legacy, RangeFull, RangeTo}`) - rust-lang#157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty) - rust-lang#157282 (Fix post-monomorphization error note race in the parallel frontend) - rust-lang#157352 (Make the retained dep graph deterministic under the parallel frontend) - rust-lang#157601 (Emit error for unused target expression in glob and list delegations) - rust-lang#157611 (Update `browser-ui-test` version to `0.24.0`) - rust-lang#157620 (Add a strategy FnMut to inject behavior into the flush cycle) - rust-lang#157645 (Windows TLS - Only register the `atexit` hook when `cleanup` can be unloaded) - rust-lang#157646 (Keep rename-imported main alive in dead-code analysis under `--test`) - rust-lang#157647 (Start using comptime for reflection intrinsics and their wrapper functions) - rust-lang#157719 (resolve: Partially revert "Remove a special case for dummy imports") - rust-lang#155153 (Ensure Send/Sync is not implemented for std::env::Vars{,Os}) - rust-lang#155198 (fix(mgca): Allow specifying generic args (of enum) on enum itself in unit & tuple variant constructions in (direct) const args) - rust-lang#155323 (refactor `TypeRelativePath::AssocItem` to use `AliasTerm`) - rust-lang#156497 (fix-155516: Don't suggest wrong unwrap expect) - rust-lang#156583 (Support defaults for static EIIs) - rust-lang#157013 (Ensure inferred let pattern types are well-formed) - rust-lang#157196 (Only suggest reborrowing a moved value where the reborrow is valid) - rust-lang#157230 (borrowck: avoid ICE describing fields on generic params) - rust-lang#157288 (platform support: add SNaN erratum to MIPS targets) - rust-lang#157330 (remove `IsTypeConst` from `hir::TraitItemKind`) - rust-lang#157350 (compiletest: ignore SVG `y` offset in by-lines comparison) - rust-lang#157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs) - rust-lang#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used in `dyn + dyn`) - rust-lang#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N)) - rust-lang#157691 (Move symbol hiding code to a new file) - rust-lang#157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N)) - rust-lang#157703 (Fix doc link to Instant sub in saturating caveat) Failed merges: - rust-lang#157699 (Arg splat experiment - hir FnDecl impl)
Successful merges:
ConstArgHasTypewhen normalizing projection consts #154853 (mgca: RegisterConstArgHasTypewhen normalizing projection consts)unicode_data.rstables #155527 (Replace printables table withunicode_data.rstables)core::range::{legacy, RangeFull, RangeTo}#156629 (Stabilizecore::range::{legacy, RangeFull, RangeTo})browser-ui-testversion to0.24.0#157611 (Updatebrowser-ui-testversion to0.24.0)atexithook whencleanupcan be unloaded #157645 (Windows TLS - Only register theatexithook whencleanupcan be unloaded)--test#157646 (Keep rename-imported main alive in dead-code analysis under--test)TypeRelativePath::AssocItemto useAliasTerm#155323 (refactorTypeRelativePath::AssocItemto useAliasTerm)IsTypeConstfromhir::TraitItemKind#157330 (removeIsTypeConstfromhir::TraitItemKind)yoffset in by-lines comparison #157350 (compiletest: ignore SVGyoffset in by-lines comparison)or_try_*variants forHashMapandBTreeMapEntry APIs #157355 (Addor_try_*variants forHashMapandBTreeMapEntry APIs)dyn + dyn#157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust 2015 when used indyn + dyn)errors.rsfile todiagnostics.rs(4/N) #157670 (Renameerrors.rsfile todiagnostics.rs(4/N))errors.rsfile todiagnostics.rs(5/N) #157700 (Renameerrors.rsfile todiagnostics.rs(5/N))Failed merges:
r? @ghost
Create a similar rollup