]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
0bf4aa26 | 2 | #![allow(dead_code)] |
b7449926 XL |
3 | #![allow(non_camel_case_types)] |
4 | ||
c34b1796 AL |
5 | // pretty-expanded FIXME #23616 |
6 | ||
1a4d82fc JJ |
7 | #![feature(box_syntax)] |
8 | ||
85aaf69f SL |
9 | trait hax { |
10 | fn dummy(&self) { } | |
11 | } | |
223e47cc LB |
12 | impl<A> hax for A { } |
13 | ||
dc9dc135 XL |
14 | fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> { |
15 | box x as Box<dyn hax+'static> | |
223e47cc LB |
16 | } |
17 | ||
18 | fn deadcode() { | |
1a4d82fc | 19 | perform_hax(box "deadcode".to_string()); |
223e47cc LB |
20 | } |
21 | ||
22 | pub fn main() { | |
85aaf69f | 23 | perform_hax(box 42); |
223e47cc | 24 | } |