]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-2935.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / issues / issue-2935.rs
CommitLineData
b7449926 1// run-pass
0bf4aa26 2#![allow(dead_code)]
b7449926 3#![allow(non_camel_case_types)]
1a4d82fc
JJ
4#![feature(box_syntax)]
5
c34b1796 6//type t = { a: isize };
223e47cc
LB
7// type t = { a: bool };
8type t = bool;
9
10trait it {
11 fn f(&self);
12}
13
14impl it for t {
15 fn f(&self) { }
16}
17
18pub fn main() {
85aaf69f
SL
19 // let x = ({a: 4} as it);
20 // let y = box ({a: 4});
21 // let z = box ({a: 4} as it);
1a4d82fc 22 // let z = box ({a: true} as it);
dc9dc135 23 let z: Box<_> = box (box true as Box<dyn it>);
223e47cc
LB
24 // x.f();
25 // y.f();
26 // (*z).f();
1a4d82fc 27 println!("ok so far...");
223e47cc
LB
28 z.f(); //segfault
29}