mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
13 lines
197 B
Rust
13 lines
197 B
Rust
#![allow(dead_code)]
|
|
#![forbid(box_pointers)]
|
|
|
|
|
|
struct Foo {
|
|
x: Box<isize> //~ ERROR type uses owned
|
|
}
|
|
|
|
fn main() {
|
|
let _x: Foo = Foo { x : Box::new(10) };
|
|
//~^ ERROR type uses owned
|
|
}
|