1 // Regression test for #25954: detect and reject a closure type that
4 use std::cell::{Cell, RefCell};
12 let mut p = A{x: RefCell::new(None), b: Cell::new(4i32)};
14 // This is an error about types of infinite size:
15 let q = || p.b.set(5i32); //~ ERROR mismatched types
17 *(p.x.borrow_mut()) = Some(q);