2021-08-09 07:25:57 -05:00
|
|
|
// Regression test for #88118. Used to ICE.
|
|
|
|
//
|
|
|
|
// check-pass
|
|
|
|
|
2021-08-23 17:25:55 -05:00
|
|
|
#![allow(incomplete_features)]
|
2021-08-09 07:25:57 -05:00
|
|
|
#![feature(capture_disjoint_fields)]
|
|
|
|
|
|
|
|
fn foo<MsU>(handler: impl FnOnce() -> MsU + Clone + 'static) {
|
|
|
|
Box::new(move |value| {
|
|
|
|
(|_| handler.clone()())(value);
|
|
|
|
None
|
|
|
|
}) as Box<dyn Fn(i32) -> Option<i32>>;
|
|
|
|
}
|
|
|
|
|
2021-08-23 14:53:18 -05:00
|
|
|
fn main() {}
|