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