]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-47722.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-47722.rs
1 // compile-pass
2 #![allow(dead_code)]
3
4 // Tests that automatic coercions from &mut T to *mut T
5 // allow borrows of T to expire immediately - essentially, that
6 // they work identically to 'foo as *mut T'
7 #![feature(nll)]
8
9 struct SelfReference {
10     self_reference: *mut SelfReference,
11 }
12
13 impl SelfReference {
14     fn set_self_ref(&mut self) {
15         self.self_reference = self;
16     }
17 }
18
19 fn main() {}