Revert assert! desugaring changes (#122661)#146428
Merged
bors merged 2 commits intorust-lang:masterfrom Sep 11, 2025
Merged
Conversation
Using the MCVE reported in RUST-145770.
…, r=petrochenkov" This reverts commit 1eeb8e8, reversing changes made to 324bf2b. Unfortunately the assert desugaring change is not backwards compatible, see RUST-145770. Code such as ```rust #[derive(Debug)] struct F { data: bool } impl std::ops::Not for F { type Output = bool; fn not(self) -> Self::Output { !self.data } } fn main() { let f = F { data: true }; assert!(f); } ``` would be broken by the assert desugaring change. We may need to land the change over an edition boundary, or limit the editions that the desugaring change impacts.
Collaborator
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Collaborator
This comment was marked as off-topic.
This comment was marked as off-topic.
Contributor
|
r=me |
Member
|
@bors r=estebank,jackh726 p=1 |
Collaborator
bors
added a commit
that referenced
this pull request
Sep 11, 2025
Rollup of 11 pull requests Successful merges: - #142315 (core::ptr: deduplicate docs for as_ref, addr, and as_uninit_ref) - #146335 (disable core dumps for panic-uninitialized-zeroed) - #146347 (report duplicate symbols added by the driver) - #146370 (Update the LoongArch target documentation) - #146379 (Fix `compare_against_sw_vers` test) - #146380 (Unify and deduplicate bits conv float tests) - #146415 (s390x: mark soft-float target feature as incompatible) - #146422 (Less greedily parse `[const]` bounds) - #146424 (Improve `core::ops` coverage) - #146425 (Improve `core::array` coverage) - #146428 (Revert `assert!` desugaring changes (#122661)) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Sep 11, 2025
Rollup of 11 pull requests Successful merges: - #142315 (core::ptr: deduplicate docs for as_ref, addr, and as_uninit_ref) - #146335 (disable core dumps for panic-uninitialized-zeroed) - #146347 (report duplicate symbols added by the driver) - #146370 (Update the LoongArch target documentation) - #146379 (Fix `compare_against_sw_vers` test) - #146380 (Unify and deduplicate bits conv float tests) - #146415 (s390x: mark soft-float target feature as incompatible) - #146422 (Less greedily parse `[const]` bounds) - #146424 (Improve `core::ops` coverage) - #146425 (Improve `core::array` coverage) - #146428 (Revert `assert!` desugaring changes (#122661)) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Sep 11, 2025
Rollup merge of #146428 - jieyouxu:revert-assert-desugaring, r=estebank,jackh726 Revert `assert!` desugaring changes (#122661) Reverts #122661 to prevent #145770 slipping into beta. cc `@estebank` (FYI) ### Review remarks - Commit 1 is the MCVE reported in #145770 added as a regression test `tests/ui/macros/assert-desugaring-145770.rs`. Against `master`, this test fails. - Commit 2 reverts #122661 (with a merge conflict fixed). `tests/ui/macros/assert-desugaring-145770.rs` now passes.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #122661 to prevent #145770 slipping into beta.
cc @estebank (FYI)
Review remarks
tests/ui/macros/assert-desugaring-145770.rs. Againstmaster, this test fails.assert!for better error output #122661 (with a merge conflict fixed).tests/ui/macros/assert-desugaring-145770.rsnow passes.