]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-2735.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-2735.rs
CommitLineData
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
9trait hax {
10 fn dummy(&self) { }
11}
223e47cc
LB
12impl<A> hax for A { }
13
dc9dc135
XL
14fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> {
15 box x as Box<dyn hax+'static>
223e47cc
LB
16}
17
18fn deadcode() {
1a4d82fc 19 perform_hax(box "deadcode".to_string());
223e47cc
LB
20}
21
22pub fn main() {
85aaf69f 23 perform_hax(box 42);
223e47cc 24}