mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 00:24:03 +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
|
|
}
|