]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-2734.rs
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99'
[rust.git] / src / test / ui / issues / issue-2734.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(non_camel_case_types)]
4
5 // pretty-expanded FIXME #23616
6
7 #![feature(box_syntax)]
8
9 trait hax {
10     fn dummy(&self) { }
11 }
12 impl<A> hax for A { }
13
14 fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> {
15     box x as Box<dyn hax+'static>
16 }
17
18 fn deadcode() {
19     perform_hax(box "deadcode".to_string());
20 }
21
22 pub fn main() {
23     let _ = perform_hax(box 42);
24 }