mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
22 lines
347 B
Rust
22 lines
347 B
Rust
// check-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() {}
|