]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-53843.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[rust.git] / src / test / ui / issues / issue-53843.rs
1 // run-pass
2
3 use std::ops::Deref;
4
5 pub struct Pin<P>(P);
6
7 impl<P, T> Deref for Pin<P>
8 where
9     P: Deref<Target=T>,
10 {
11     type Target = T;
12
13     fn deref(&self) -> &T {
14         &*self.0
15     }
16 }
17
18 impl<P> Pin<P> {
19     fn poll(self) {}
20 }
21
22 fn main() {
23     let mut unit = ();
24     let pin = Pin(&mut unit);
25     pin.poll();
26 }