rust/src/test/ui/issues/issue-28279.rs
2019-05-29 00:57:31 -04:00

22 lines
349 B
Rust

// compile-pass
#![allow(dead_code)]
use std::rc::Rc;
fn test1() -> Rc<dyn for<'a> Fn(&'a usize) + 'static> {
if let Some(_) = Some(1) {
loop{}
} else {
loop{}
}
}
fn test2() -> *mut (dyn for<'a> Fn(&'a usize) + 'static) {
if let Some(_) = Some(1) {
loop{}
} else {
loop{}
}
}
fn main() {}