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