summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-53843.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-53843.rs')
-rw-r--r--tests/ui/issues/issue-53843.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-53843.rs b/tests/ui/issues/issue-53843.rs
new file mode 100644
index 000000000..f305b370c
--- /dev/null
+++ b/tests/ui/issues/issue-53843.rs
@@ -0,0 +1,26 @@
+// run-pass
+
+use std::ops::Deref;
+
+pub struct Pin<P>(P);
+
+impl<P, T> Deref for Pin<P>
+where
+ P: Deref<Target=T>,
+{
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ &*self.0
+ }
+}
+
+impl<P> Pin<P> {
+ fn poll(self) {}
+}
+
+fn main() {
+ let mut unit = ();
+ let pin = Pin(&mut unit);
+ pin.poll();
+}