]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-addr-of-upvar-self.rs
Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726
[rust.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; //~ ERROR cannot infer
9             *p = 3;
10         };
11     }
12 }
13
14 fn main() {
15 }