1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2 --> $DIR/unsized-ret.rs:10:27
4 LL | foo::<fn() -> str, _>(None, ());
5 | --------------------- ^^^^ doesn't have a size known at compile-time
7 | required by a bound introduced by this call
9 = help: within `fn() -> str`, the trait `Sized` is not implemented for `str`
10 = note: required because it appears within the type `fn() -> str`
11 note: required by a bound in `foo`
12 --> $DIR/unsized-ret.rs:5:11
14 LL | fn foo<F: Fn<T>, T:std::marker::Tuple>(f: Option<F>, t: T) {
15 | ^^^^^ required by this bound in `foo`
17 error[E0277]: the size for values of type `(dyn std::fmt::Display + 'a)` cannot be known at compilation time
18 --> $DIR/unsized-ret.rs:13:66
20 LL | foo::<for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a), _>(None, (&(),));
21 | ------------------------------------------------------------ ^^^^ doesn't have a size known at compile-time
23 | required by a bound introduced by this call
25 = help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`
26 = note: required because it appears within the type `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`
27 note: required by a bound in `foo`
28 --> $DIR/unsized-ret.rs:5:11
30 LL | fn foo<F: Fn<T>, T:std::marker::Tuple>(f: Option<F>, t: T) {
31 | ^^^^^ required by this bound in `foo`
33 error: aborting due to 2 previous errors
35 For more information about this error, try `rustc --explain E0277`.