diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-28279.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-28279.rs b/src/test/ui/issues/issue-28279.rs new file mode 100644 index 000000000..bab5df122 --- /dev/null +++ b/src/test/ui/issues/issue-28279.rs @@ -0,0 +1,21 @@ +// 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() {} |