commit | 25137f3f668bc93feddaa31e773f81bdce6a6f45 | [log] [tgz] |
---|---|---|
author | Rust timing bot <rust-timer@users.noreply.github.com> | Sun Oct 19 05:32:24 2025 +0200 |
committer | GitHub <noreply@github.com> | Sun Oct 19 05:32:24 2025 +0200 |
tree | 7e5116b329824756aa234ebe6fabc09b16769ad1 | |
parent | 6380899f32599ea25615d4ccd708d0e8da652b0c [diff] | |
parent | 845ff73d39d6800c8b8d33e25c16ab7b72e7aa51 [diff] |
Unrolled build for #138679 Rollup merge of #138679 - Shunpoco:issue-125323, r=oli-obk Issue-125323: ICE non-ADT in struct pattern when long time constant evaluation is in for loop This PR fixes #125323 ## Context According to the issue, the ICE happens since #121206. In the PR, some error methods were reorganized. For example, has_errors() was renamed to has_errors_exclude_lint_errors(). However, some codes which used the original has_errors() were not switched to has_errors_exclude_lint_errors(). I finally found that report_error() in writeback.rs causes this ICE. Currently the method uses tainted_by_errors() to get guar (ErrorGuaranteed), but originally it used dcx().has_errors() but it wasn't changed to has_errors_exclude_lint_errors() when changes in #121206 were merged. I don't think I fully understand how an error is propagated, but I suppose that the error from long time constant evaluation is unexpectedly propagated other parts (in this ICE, for loop), then cause the non-ADT in struct pattern ICE. ## Change - Fix report_error() in writeback.rs: use dcx().has_errors_exclude_lint_errors() instead of tainted_by_errors() to prevent error propagation from constant evaluation. - Add test for the ICE - Modify some tests to align the change: Due to this fix, E0282 error happens (or not happen anymore) in some tests. ## NOTE The 4th commit aims to revert the fix in #123516 because I confirmed that the ICE solved by the PR doesn't happen if I modify report_error(). I think the root cause of that ICE is the same as #125323 . But I can discard this commit since we can fix #125323 without it.
Website | Getting started | Learn | Documentation | Contributing
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrated with other languages.
Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the “Rust Trademarks”).
If you want to use these names or brands, please read the Rust language trademark policy.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.