]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-2935.rs
Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc
[rust.git] / src / test / ui / issues / issue-2935.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_camel_case_types)]
4 #![feature(box_syntax)]
5
6 //type t = { a: isize };
7 // type t = { a: bool };
8 type t = bool;
9
10 trait it {
11     fn f(&self);
12 }
13
14 impl it for t {
15     fn f(&self) { }
16 }
17
18 pub fn main() {
19   //    let x = ({a: 4} as it);
20   //   let y = box ({a: 4});
21   //    let z = box ({a: 4} as it);
22   //    let z = box ({a: true} as it);
23     let z: Box<_> = box (box true as Box<dyn it>);
24     //  x.f();
25     // y.f();
26     // (*z).f();
27     println!("ok so far...");
28     z.f(); //segfault
29 }