diff options
| author | Jieyou Xu <jieyouxu@outlook.com> | 2025-09-11 09:00:01 +0800 |
|---|---|---|
| committer | Jieyou Xu <jieyouxu@outlook.com> | 2025-09-11 09:10:46 +0800 |
| commit | b38a86f4d7c28ae9ab153b87c7e45037e56306fb (patch) | |
| tree | 4a732b90729f242a458b49d98ec79d96dc186a58 /tests/ui/consts | |
| parent | fc58d8f5cce592998d0ba43b25e445eb6b96c827 (diff) | |
| download | rust-b38a86f4d7c28ae9ab153b87c7e45037e56306fb.tar.gz rust-b38a86f4d7c28ae9ab153b87c7e45037e56306fb.zip | |
Revert "Rollup merge of #122661 - estebank:assert-macro-span, r=petrochenkov"
This reverts commit 1eeb8e8b151d1da7daa73837a25dc5f7a1a7fa28, reversing
changes made to 324bf2b9fd8bf9661e7045c8a93f5ff0ec1a8ca5.
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.
Diffstat (limited to 'tests/ui/consts')
| -rw-r--r-- | tests/ui/consts/control-flow/assert.stderr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/consts/control-flow/assert.stderr b/tests/ui/consts/control-flow/assert.stderr index deaad6abbcc..026097a6ba0 100644 --- a/tests/ui/consts/control-flow/assert.stderr +++ b/tests/ui/consts/control-flow/assert.stderr @@ -1,8 +1,8 @@ error[E0080]: evaluation panicked: assertion failed: false - --> $DIR/assert.rs:5:23 + --> $DIR/assert.rs:5:15 | LL | const _: () = assert!(false); - | ^^^^^ evaluation of `_` failed here + | ^^^^^^^^^^^^^^ evaluation of `_` failed here error: aborting due to 1 previous error |
