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