2015-01-28 08:34:18 -05:00
|
|
|
#[derive(Debug)]
|
2018-12-16 22:21:47 -05:00
|
|
|
struct R {
|
2013-07-02 12:47:32 -07:00
|
|
|
b: bool,
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
impl Drop for R {
|
2013-09-16 21:18:07 -04:00
|
|
|
fn drop(&mut self) {}
|
2011-09-23 18:13:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2018-12-16 22:21:47 -05:00
|
|
|
let i = Box::new(R { b: true });
|
2020-09-26 17:20:14 -04:00
|
|
|
let _j = i.clone(); //~ ERROR the method
|
2014-12-20 00:09:35 -08:00
|
|
|
println!("{:?}", i);
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|