]> git.lizzy.rs Git - rust.git/blob - tests/ui/hr-subtype/return-static.rs
Rollup merge of #107740 - oli-obk:lock_tcx, r=petrochenkov
[rust.git] / tests / ui / hr-subtype / return-static.rs
1 // check-pass
2
3 fn make<T>() -> T {
4     panic!()
5 }
6
7 fn take<T>(x: T) {}
8
9 fn main() {
10     let x: for<'a> fn(&'a u32) -> _ = make();
11     let y: &'static u32 = x(&22);
12     take::<for<'b> fn(&'b u32) -> &'b u32>(x);
13 }