]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-47722.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-47722.rs
1 // check-pass
2
3 // Tests that automatic coercions from &mut T to *mut T
4 // allow borrows of T to expire immediately - essentially, that
5 // they work identically to 'foo as *mut T'
6
7 struct SelfReference {
8 self_reference: *mut SelfReference,
9 }
10
11 impl SelfReference {
12 fn set_self_ref(&mut self) {
13 self.self_reference = self;
14 }
15 }
16
17 fn main() {}