]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-9129.rs
Auto merge of #93530 - anonion0:pthread_sigmask_fix, r=JohnTitor
[rust.git] / src / test / ui / issues / issue-9129.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_camel_case_types)]
4 #![allow(non_snake_case)]
5 // ignore-pretty unreported
6
7 #![feature(box_syntax)]
8
9 pub trait bomb { fn boom(&self, _: Ident); }
10 pub struct S;
11 impl bomb for S { fn boom(&self, _: Ident) { } }
12
13 pub struct Ident { name: usize }
14
15 macro_rules! int3 { () => ( { } ) }
16
17 fn Ident_new() -> Ident {
18     int3!();
19     Ident {name: 0x6789ABCD }
20 }
21
22 pub fn light_fuse(fld: Box<dyn bomb>) {
23     int3!();
24     let f = || {
25         int3!();
26         fld.boom(Ident_new()); // *** 1
27     };
28     f();
29 }
30
31 pub fn main() {
32     let b = box S as Box<dyn bomb>;
33     light_fuse(b);
34 }