This reverts commit1eeb8e8b15, reversing changes made to324bf2b9fd. 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.
5 lines
81 B
Rust
5 lines
81 B
Rust
fn main() {
|
|
assert!("foo");
|
|
//~^ ERROR cannot apply unary operator `!`
|
|
}
|