]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-2734.rs
Auto merge of #104013 - notriddle:notriddle/rustdoc-sizeof, r=GuillaumeGomez
[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 trait hax {
8     fn dummy(&self) { }
9 }
10 impl<A> hax for A { }
11
12 fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> {
13     Box::new(x) as Box<dyn hax+'static>
14 }
15
16 fn deadcode() {
17     perform_hax(Box::new("deadcode".to_string()));
18 }
19
20 pub fn main() {
21     let _ = perform_hax(Box::new(42));
22 }