mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +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
|
|
}
|