1 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
2 --> $DIR/closure-return-type-must-be-sized.rs:54:5
4 LL | a::foo::<fn() -> dyn A>();
5 | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
7 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
8 = note: required because it appears within the type `fn() -> dyn A`
10 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
11 --> $DIR/closure-return-type-must-be-sized.rs:55:14
13 LL | a::bar::<fn() -> dyn A, _>();
14 | ^^^^^^^^^^^^^ doesn't have a size known at compile-time
16 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
17 = note: required because it appears within the type `fn() -> dyn A`
18 note: required by a bound in `a::bar`
19 --> $DIR/closure-return-type-must-be-sized.rs:14:19
21 LL | pub fn bar<F: FnOnce() -> R, R: ?Sized>() {}
22 | ^^^^^^^^^^^^^ required by this bound in `a::bar`
24 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
25 --> $DIR/closure-return-type-must-be-sized.rs:56:5
27 LL | a::baz::<fn() -> dyn A>();
28 | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
30 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
31 = note: required because it appears within the type `fn() -> dyn A`
33 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
34 --> $DIR/closure-return-type-must-be-sized.rs:61:5
36 LL | b::foo::<fn() -> dyn A>();
37 | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
39 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
40 = note: required because it appears within the type `fn() -> dyn A`
42 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
43 --> $DIR/closure-return-type-must-be-sized.rs:62:14
45 LL | b::bar::<fn() -> dyn A, _>();
46 | ^^^^^^^^^^^^^ doesn't have a size known at compile-time
48 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
49 = note: required because it appears within the type `fn() -> dyn A`
50 note: required by a bound in `b::bar`
51 --> $DIR/closure-return-type-must-be-sized.rs:28:19
53 LL | pub fn bar<F: Fn() -> R, R: ?Sized>() {}
54 | ^^^^^^^^^ required by this bound in `b::bar`
56 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
57 --> $DIR/closure-return-type-must-be-sized.rs:63:5
59 LL | b::baz::<fn() -> dyn A>();
60 | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
62 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
63 = note: required because it appears within the type `fn() -> dyn A`
65 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
66 --> $DIR/closure-return-type-must-be-sized.rs:68:5
68 LL | c::foo::<fn() -> dyn A>();
69 | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
71 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
72 = note: required because it appears within the type `fn() -> dyn A`
74 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
75 --> $DIR/closure-return-type-must-be-sized.rs:69:14
77 LL | c::bar::<fn() -> dyn A, _>();
78 | ^^^^^^^^^^^^^ doesn't have a size known at compile-time
80 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
81 = note: required because it appears within the type `fn() -> dyn A`
82 note: required by a bound in `c::bar`
83 --> $DIR/closure-return-type-must-be-sized.rs:42:19
85 LL | pub fn bar<F: FnMut() -> R, R: ?Sized>() {}
86 | ^^^^^^^^^^^^ required by this bound in `c::bar`
88 error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
89 --> $DIR/closure-return-type-must-be-sized.rs:70:5
91 LL | c::baz::<fn() -> dyn A>();
92 | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
94 = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
95 = note: required because it appears within the type `fn() -> dyn A`
97 error: aborting due to 9 previous errors
99 For more information about this error, try `rustc --explain E0277`.