blob: 25f5d0f50139fc6bf72cb30c6c8e269a0ebe8ff2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//@ 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.
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() {}
|