]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-owned-heap-memory.rs
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
[rust.git] / tests / ui / lint / lint-owned-heap-memory.rs
1 #![allow(dead_code)]
2 #![forbid(box_pointers)]
3
4
5 struct Foo {
6     x: Box<isize> //~ ERROR type uses owned
7 }
8
9 fn main() {
10     let _x: Foo = Foo { x : Box::new(10) };
11     //~^ ERROR type uses owned
12 }