rust/src/test/ui/issues/issue-28279.rs

22 lines
347 B
Rust
Raw Normal View History

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