]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-addr-of-upvar-self.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-addr-of-upvar-self.rs
1 struct Dog {
2 food: usize,
3 }
4
5 impl Dog {
6 pub fn chase_cat(&mut self) {
7 let _f = || {
8 let p: &'static mut usize = &mut self.food;
9 //~^ ERROR lifetime may not live long enough
10 //~^^ ERROR lifetime may not live long enough
11 //~^^^ ERROR E0597
12 *p = 3;
13 };
14 }
15 }
16
17 fn main() {
18 }