2019-11-03 18:00:00 -06:00
|
|
|
// check-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-09-14 16:52:48 -05:00
|
|
|
use std::rc::Rc;
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
fn test1() -> Rc<dyn for<'a> Fn(&'a usize) + 'static> {
|
2015-09-14 16:52:48 -05:00
|
|
|
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) {
|
2015-09-14 16:52:48 -05:00
|
|
|
if let Some(_) = Some(1) {
|
|
|
|
loop{}
|
|
|
|
} else {
|
|
|
|
loop{}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|