]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-52213.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-52213.rs
1 fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
2     match (&t,) { //~ ERROR cannot infer an appropriate lifetime
3         ((u,),) => u,
4     }
5 }
6
7 fn main() {
8     let x = {
9         let y = Box::new((42,));
10         transmute_lifetime(&y)
11     };
12
13     println!("{}", x);
14 }