summaryrefslogtreecommitdiffstats
path: root/src/test/ui/regions/regions-issue-21422.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/regions/regions-issue-21422.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/regions/regions-issue-21422.rs b/src/test/ui/regions/regions-issue-21422.rs
new file mode 100644
index 000000000..198b71466
--- /dev/null
+++ b/src/test/ui/regions/regions-issue-21422.rs
@@ -0,0 +1,18 @@
+// 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() {}