rust/src/test/ui/lint/lint-owned-heap-memory.rs
2018-12-25 21:08:33 -07:00

13 lines
213 B
Rust

#![allow(dead_code)]
#![forbid(box_pointers)]
#![feature(box_syntax)]
struct Foo {
x: Box<isize> //~ ERROR type uses owned
}
fn main() {
let _x : Foo = Foo {x : box 10};
//~^ ERROR type uses owned
}