]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/mir_check_cast_unsize.rs
Auto merge of #67060 - Centril:rollup-hwhdx4h, r=Centril
[rust.git] / src / test / ui / nll / mir_check_cast_unsize.rs
1 // compile-flags: -Z borrowck=mir
2
3 #![allow(dead_code)]
4
5 use std::fmt::Debug;
6
7 fn bar<'a>(x: &'a u32) -> &'static dyn Debug {
8     x
9     //~^ ERROR lifetime may not live long enough
10 }
11
12 fn main() {}