mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-29 15:48:52 +00:00

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.
10 lines
295 B
Plaintext
10 lines
295 B
Plaintext
error[E0600]: cannot apply unary operator `!` to type `&'static str`
|
|
--> $DIR/issue-28308.rs:2:5
|
|
|
|
|
LL | assert!("foo");
|
|
| ^^^^^^^^^^^^^^ cannot apply unary operator `!`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0600`.
|