rust/tests/ui/issues/issue-28279.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
347 B
Rust
Raw Normal View History

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