2014-06-06 15:51:42 +02:00
|
|
|
#![allow(dead_code)]
|
2014-10-27 15:37:07 -07:00
|
|
|
#![forbid(box_pointers)]
|
2021-08-25 02:39:40 +02:00
|
|
|
|
2014-05-05 18:56:44 -07:00
|
|
|
|
2013-01-28 18:36:27 -08:00
|
|
|
struct Foo {
|
2015-01-08 21:54:35 +11:00
|
|
|
x: Box<isize> //~ ERROR type uses owned
|
2013-01-28 18:36:27 -08:00
|
|
|
}
|
2012-08-28 18:25:41 -07:00
|
|
|
|
|
|
|
fn main() {
|
2021-08-25 02:39:40 +02:00
|
|
|
let _x: Foo = Foo { x : Box::new(10) };
|
2012-08-28 18:25:41 -07:00
|
|
|
//~^ ERROR type uses owned
|
|
|
|
}
|