]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-issue-21422.rs
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / regions / regions-issue-21422.rs
1 // run-pass
2 // Regression test for issue #21422, which was related to failing to
3 // add inference constraints that the operands of a binary operator
4 // should outlive the binary operation itself.
5
6 // pretty-expanded FIXME #23616
7
8 pub struct P<'a> {
9     _ptr: *const &'a u8,
10 }
11
12 impl <'a> PartialEq for P<'a> {
13     fn eq(&self, other: &P<'a>) -> bool {
14         (self as *const _) == (other as *const _)
15     }
16 }
17
18 fn main() {}