about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-09-10Rollup merge of #146178 - folkertdev:static-align, ↵Matthias Krüger-5/+246
r=jdonszelmann,ralfjung,traviscross Implement `#[rustc_align_static(N)]` on `static`s Tracking issue: https://github.com/rust-lang/rust/issues/146177 ```rust #![feature(static_align)] #[rustc_align_static(64)] static SO_ALIGNED: u64 = 0; ``` We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`. r? `@traviscross`
2025-09-10Rollup merge of #144765 - Qelxiros:range-inclusive-last, r=jhprattMatthias Krüger-1/+0
inclusive `Range`s: change `end` to `last` Tracking issue: rust-lang/rust#125687 ACP: rust-lang/libs-team#511
2025-09-10Rollup merge of #144765 - Qelxiros:range-inclusive-last, r=jhprattMatthias Krüger-53/+245
inclusive `Range`s: change `end` to `last` Tracking issue: rust-lang/rust#125687 ACP: rust-lang/libs-team#511
2025-09-10Permit `more_maybe_bounds` in supertraits and trait objects onlyBryanskiy-18/+60
2025-09-10Default auto traits: revert to the default supertraitsBryanskiy-333/+155
2025-09-10fix(needless_closure): don't lint on `AsyncFn*`sAda Alakbarova-12/+31
2025-09-10Update to LLVM 21.1.1Nikita Popov-0/+0
2025-09-10avoid calling insert_presorted more than onceRalf Jung-11/+17
2025-09-10interpret: copy_provenance: avoid large intermediate buffer for large repeat ↵Ralf Jung-81/+81
counts
2025-09-10Add suggestionsGeorg Semmler-3/+2
2025-09-10Merge pull request #20649 from ChayimFriedman2/cast-unknownShoyu Vanilla (Flint)-6/+25
fix: Always coerce in a cast, even when there are unknown types
2025-09-10Always coerce in a cast, even when there are unknown typesChayim Refael Friedman-6/+25
This cause the relationships between inference vars to get recorded.
2025-09-10Merge pull request #20645 from ChayimFriedman2/update-rustcShoyu Vanilla (Flint)-330/+468
internal: Upgrade rustc crates
2025-09-10Merge pull request #20647 from ChayimFriedman2/ns-projectionsShoyu Vanilla (Flint)-199/+266
fix: Fix normalization in the new solver
2025-09-10Properly handle normalizationChayim Refael Friedman-198/+235
Previously normalization was broken, which caused a lot of fake errors. This fix most type mismatches of the new solver, and it also reverts many test regressions. The downside is that now `chalk_ir::TyKind::AssociatedType`/`chalk_ir::TyKind::Alias` cannot be trusted anymore with their roles, namely: `AssociatedType` is always fully normalized and `Alias` only if it can possibly be normalized further. That seems okay as the new solver does not have this distinction at all (due to it being a lazy normalizer), so this will only hold for the migration time. This does mean we have to change some APIs, notably `hir::Type::walk()` and `TyFingerprint`, to treat `Alias` the same as `AssociatedType`. Another small thing this commit does is to isolate processing of user-written types (currently involving replacing error types and normalizing, but in the future validation will also be needed) to separate functions.
2025-09-09don't trim paths in mir dumping when filtering and at the top of the filebeepster4096-10/+12
2025-09-09port `#[no_std]` to the new attribute parsing infrastructureJana Dönszelmann-2/+19
2025-09-09port `#[no_core]` to the new attribute parsing infrastructureJana Dönszelmann-2/+20
2025-09-10An associated type is not a projection!Chayim Refael Friedman-1/+31
More correctly, a `TyKind::AssociatedType` is not the same as `TyKind::Projection`. We used to map next-solver `TyKind::Alias` to Chalk's `TyKind::AssociatedType`. This is very incorrect, as `AssociatedType` is assumed to be fully normalized, and caused a lot of type mismatches. Unfortunately fixing this causes a lot of stack overflows, because the next solver doesn't have something akin to `AssociatedType` so we normalize again and again. The reason is that is the lazy-normalization nature of the next solver, which means we need to stop normalizing everything. This will be fixed in the next commit.
2025-09-10Adopt even more custom types in the new solverChayim Refael Friedman-222/+220
A lot of simplification and fun.
2025-09-10Upgrade rustc crates and handle changes to canonicalizationChayim Refael Friedman-116/+256
They have to do with diagnostics, we could probably not support them but we will also someday want good diagnostics. The code is mostly copied from rustc.
2025-09-09allow `#[rustc_align_static(N)]` on `static`sFolkert de Vries-5/+246
We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`.
2025-09-09c-variadic: reject functions with unsupported extern ABIFolkert de Vries-40/+79
2025-09-09c-variadic: reject non-unsafe functionsFolkert de Vries-21/+98
2025-09-09Merge pull request #20613 from A4-Tacks/diag-unresolved-field-fixes-wsDavid Barsky-13/+52
Fix indent for unresolved_field fixes
2025-09-09Auto merge of #146375 - matthiaskrgr:rollup-utik9zj, r=matthiaskrgrbors-129/+416
Rollup of 6 pull requests Successful merges: - rust-lang/rust#145463 (Reject invalid literal suffixes in tuple indexing, tuple struct indexing, and struct field name position) - rust-lang/rust#145929 (fix APITIT being treated as a normal generic parameter in suggestions) - rust-lang/rust#146001 (Update getopts to remove unicode-width dependency) - rust-lang/rust#146365 (triagebot: warn about #[rustc_intrinsic_const_stable_indirect]) - rust-lang/rust#146366 (add approx_delta to all gamma tests) - rust-lang/rust#146373 (fix comments about trait solver cycle heads) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-09Strip frontmatter in fewer placesLeón Orell Valerian Liehr-7/+9
2025-09-09Strip frontmatter in fewer placesLeón Orell Valerian Liehr-115/+208
2025-09-09Fix compare_against_sw_vers test when a version part is 0Mads Marquart-3/+3
2025-09-09Update wasm-component-ld to 0.5.17Alex Crichton-26/+26
Keeping this up-to-date as the project itself, and its dependencies, are updated.
2025-09-09Merge pull request #1914 from folkertdev/architecture-testFolkert de Vries-390/+484
`intrinsic-test`: make `build_{c, rust}_file` generic
2025-09-09Merge pull request #20639 from ChayimFriedman2/update-test-absDavid Barsky-23/+85
fix: Resolve paths to snapshot test libraries absolutely
2025-09-09Merge pull request #20578 from ShoyuVanilla/inftblChayim Refael Friedman-819/+2071
Migrate `InferenceTable` into next-solver
2025-09-10Fix failing tests and fill-in missing detailsShoyu Vanilla-1428/+914
2025-09-10fix: `useless_attribute` FP on `deprecated_in_future`yanglsh-0/+22
2025-09-09Rollup merge of #146373 - calvinhirsch:trait-solver-cycle-head-docs, r=lcnrMatthias Krüger-4/+4
fix comments about trait solver cycle heads update some comments that use "cycle root" rather than "cycle head" also fixed a random other nearby typo in `StackEntry` docs zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/quick.20question.20about.20SearchGraph.3A.3Aevaluate_goal_in_task/with/538004295 ?r lcnr
2025-09-09Rollup merge of #146366 - LorrensP-2158466:miri-gamma, r=RalfJungMatthias Krüger-5/+5
add approx_delta to all gamma tests f32::gamma tests are less precise in CI, so we increase the tolerance for these tests. See [#miri > Miri test-libstd Failure (2025-09) @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282025-09.29/near/538138742) r? `@RalfJung`
2025-09-09Rollup merge of #146365 - ↵Matthias Krüger-2/+13
RalfJung:triagebot-rustc_intrinsic_const_stable_indirect, r=jieyouxu triagebot: warn about #[rustc_intrinsic_const_stable_indirect] Also make the warnings a bit more noticeable by adding a ⚠️.
2025-09-09Rollup merge of #146001 - bjorn3:update_getopts, r=davidtwcoMatthias Krüger-18/+6
Update getopts to remove unicode-width dependency Pulls in https://github.com/rust-lang/getopts/pull/133. This saves 1.5MB on the vendored size of the standard library.
2025-09-09Rollup merge of #145929 - Qelxiros:apitit-suggestion, r=BoxyUwUMatthias Krüger-27/+74
fix APITIT being treated as a normal generic parameter in suggestions closes rust-lang/rust#126395
2025-09-09Rollup merge of #145463 - jieyouxu:error-suffix, r=fmeaseMatthias Krüger-73/+314
Reject invalid literal suffixes in tuple indexing, tuple struct indexing, and struct field name position Tracking issue: rust-lang/rust#60210 Closes rust-lang/rust#60210 ## Summary Bump the ["suffixes on a tuple index are invalid" non-lint pseudo future-incompatibility warning (#60210)][issue-60210][^non-lint] to a **hard error** across all editions, rejecting the remaining carve outs from accidentally accepted invalid suffixes since Rust **1.27**. - We accidentally accepted invalid suffixes in tuple indexing positions in Rust **1.27**. Originally reported at https://github.com/rust-lang/rust/issues/59418. - We tried to hard reject all invalid suffixes in https://github.com/rust-lang/rust/pull/59421, but unfortunately it turns out there were proc macros accidentally relying on it: https://github.com/rust-lang/rust/issues/60138. - We temporarily accepted `{i,u}{32,size}` in https://github.com/rust-lang/rust/pull/60186 (the "*carve outs*") to mitigate *immediate* ecosystem impact, but it came with an FCW warning indicating that we wanted to reject it after a few Rust releases. - Now (1.89.0) is a few Rust releases later (1.35.0), thus I'm proposing to **also reject the carve outs**. - `std::mem::offset_of!` stabilized in Rust **1.77.0** happens to use the same "don't expect suffix" code path which has the carve outs, so it also accepted the carve out suffixes. I'm proposing to **reject this case as well**. ## What specifically breaks? Code that still relied on invalid `{i,u}{32,size}` suffixes being temporarily accepted by rust-lang/rust#60186 as an ecosystem impact mitigation measure (cf. rust-lang/rust#60138). Specifically, the following cases (particularly the construction of these forms in proc macros like reported in rust-lang/rust#60138): ### Position 1: Invalid `{i,u}{32,size}` suffixes in tuple indexing ```rs fn main() { let _x = (42,).0invalid; // Already error, already rejected by #59421 let _x = (42,).0i8; // Already error, not one of the #60186 carve outs. let _x = (42,).0usize; // warning: suffixes on a tuple index are invalid } ``` ### Position 2: Invalid `{i,u}{32,size}` suffixes in tuple struct indexing ```rs fn main() { struct X(i32); let _x = X(42); let _x = _x.0invalid; // Already error, already rejected by #59421 let _x = _x.0i8; // Already error, not one of the #60186 carve outs. let _x = _x.0usize; // warning: suffixes on a tuple index are invalid } ``` ### Position 3: Invalid `{i,u}{32,size}` suffixes in numeric struct field names ```rs fn main() { struct X(i32, i32, i32); let _x = X(1, 2, 3); let _y = X { 0usize: 42, 1: 42, 2: 42 }; // warning: suffixes on a tuple index are invalid match _x { X { 0usize: 1, 1: 2, 2: 3 } => todo!(), // warning: suffixes on a tuple index are invalid _ => {} } } ``` ### Position 4: Invalid `{i,u}{32,size}` suffixes in `std::mem::offset_of!` While investigating the warning, unfortunately I noticed `std::mem::offset_of!` also happens to use the "expect no suffix" code path which had the carve outs. So this was accepted since Rust **1.77.0** with the same FCW: ```rs fn main() { #[repr(C)] pub struct Struct<T>(u8, T); assert_eq!(std::mem::offset_of!(Struct<u32>, 0usize), 0); //~^ WARN suffixes on a tuple index are invalid } ``` ### The above forms in proc macros For instance, constructions like (see tracking issue rust-lang/rust#60210): ```rs let i = 0; quote! { foo.$i } ``` where the user needs to actually write ```rs let i = syn::Index::from(0); quote! { foo.$i } ``` ### Crater results Conducted a crater run (https://github.com/rust-lang/rust/pull/145463#issuecomment-3194920383). - https://github.com/AmlingPalantir/r4/tree/256af3c72f094b298cd442097ef7c571d8001f29: genuine regression; "invalid suffix `usize`" in derive macro. Has a ton of other build warnings, last updated 6 years ago. - Exactly the kind of intended breakage. Minimized down to https://github.com/AmlingPalantir/r4/blob/256af3c72f094b298cd442097ef7c571d8001f29/validates_derive/src/lib.rs#L71-L75, where when interpolation uses `quote`'s `ToTokens` on a `usize` index (i.e. on tuple struct `Tup(())`), the generated suffix becomes `.0usize` (cf. Position 2). - Notified crate author of breakage in https://github.com/AmlingPalantir/r4/issues/1. - Other failures are unrelated or spurious. ## Review remarks - Commits 1-3 expands the test coverage to better reflect the current situation before doing any functional changes. - Commit 4 is an intentional **breaking change**. We bump the non-lint "suffixes on a tuple index are invalid" warning into a hard error. Thus, this will need a crater run and a T-lang FCP. ## Tasks - [x] Run crater to check if anyone is still relying on this being not a hard error. Determine degree of ecosystem breakage. - [x] If degree of breakage seems acceptable, draft nomination report for T-lang for FCP. - [x] Determine hard error on Edition 2024+, or on all editions. ## Accompanying Reference update - https://github.com/rust-lang/reference/pull/1966 [^non-lint]: The FCW was implemented as a *non-lint* warning (meaning it has no associated lint name, and you can't `#![deny(..)]` it) because spans coming from proc macros could not be distinguished from regular field access. This warning was also intentionally impossible to silence. See https://github.com/rust-lang/rust/pull/60186#issuecomment-485581694. [issue-60210]: https://github.com/rust-lang/rust/issues/60210
2025-09-09Update `browser-ui-test` version to `0.22.2`Guillaume Gomez-5/+5
2025-09-09Improve docs of certain built-in macro expandersLeón Orell Valerian Liehr-13/+18
2025-09-09Make the compile test use a const insteadGeorg Semmler-8/+7
2025-09-09Make Barrier RefUnwindSafe againGeorg Semmler-0/+15
This commit manually implements `RefUnwindSafe` for `std::sync::Barrier` to fix 146087. This is a fix for a regression indroduced by https://github.com/rust-lang/rust/commit/e95db591a4550e28ad92660b753ad85b89271882
2025-09-09Auto merge of #145717 - BoxyUwU:erase_regions_rename, r=lcnrbors-137/+162
rename erase_regions to erase_and_anonymize_regions I find it consistently confusing that `erase_regions` does more than replacing regions with `'erased`. it also makes some code look real goofy to be writing manual folders to erase regions with a comment saying "we cant use erase regions" :> or code that re-calls erase_regions on types with regions already erased just to anonymize all the bound regions. r? lcnr idk how i feel about the name being almost twice as long now
2025-09-09fix comments about trait solver cycle headscalvinhirsch-4/+4
2025-09-09WIP switch inference table to next-solverjackh726-526/+2292
2025-09-09erase_regions to erase_and_anonymize_regionsBoxy-8/+8
2025-09-09Add assertionBoxy-1/+1