rust/tests/ui/regions/regions-issue-21422.rs
Michael Goulet ac56007ea7 Revert "Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix"
This reverts commit 13314df21b0bb0cdd02c6760581d1b9f1052fa7e, reversing
changes made to 6e534c73c35f569492ed5fb5f349075d58ed8b7e.
2024-08-03 07:57:31 -04:00

19 lines
425 B
Rust

//@ run-pass
// Regression test for issue #21422, which was related to failing to
// add inference constraints that the operands of a binary operator
// should outlive the binary operation itself.
//@ pretty-expanded FIXME #23616
pub struct P<'a> {
_ptr: *const &'a u8,
}
impl <'a> PartialEq for P<'a> {
fn eq(&self, other: &P<'a>) -> bool {
(self as *const _) == (other as *const _)
}
}
fn main() {}