3 // Test to suggest boxing the return type, and the closure branch of the `if`
5 fn print_on_or_the_other<'a>(a: i32, b: &'a String) -> dyn Fn() + 'a {
6 //~^ ERROR return type cannot have an unboxed trait object
8 move || println!("{a}")
10 Box::new(move || println!("{}", b))
11 //~^ ERROR `if` and `else` have incompatible types