2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2018-09-14 05:20:28 -05:00
|
|
|
#![allow(dead_code)]
|
2012-01-02 03:20:58 -06:00
|
|
|
// Make sure #1399 stays fixed
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
struct A { a: Box<isize> }
|
2013-01-26 00:46:32 -06:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2015-01-02 16:32:54 -06:00
|
|
|
fn invoke<F>(f: F) where F: FnOnce() { f(); }
|
2021-08-24 19:39:40 -05:00
|
|
|
let k: Box<_> = 22.into();
|
2013-03-15 17:27:15 -05:00
|
|
|
let _u = A {a: k.clone()};
|
2014-10-14 20:07:11 -05:00
|
|
|
invoke(|| println!("{}", k.clone()) )
|
2012-01-02 03:20:58 -06:00
|
|
|
}
|