summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/closure-return-type-must-be-sized.stderr
blob: b07425bd82501fff334063b0f1d6eb6433ff37ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:54:5
   |
LL |     a::foo::<fn() -> dyn A>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:55:14
   |
LL |     a::bar::<fn() -> dyn A, _>();
   |              ^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `a::bar`
  --> $DIR/closure-return-type-must-be-sized.rs:14:19
   |
LL |     pub fn bar<F: FnOnce() -> R, R: ?Sized>() {}
   |                   ^^^^^^^^^^^^^ required by this bound in `a::bar`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:56:5
   |
LL |     a::baz::<fn() -> dyn A>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:61:5
   |
LL |     b::foo::<fn() -> dyn A>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:62:14
   |
LL |     b::bar::<fn() -> dyn A, _>();
   |              ^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `b::bar`
  --> $DIR/closure-return-type-must-be-sized.rs:28:19
   |
LL |     pub fn bar<F: Fn() -> R, R: ?Sized>() {}
   |                   ^^^^^^^^^ required by this bound in `b::bar`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:63:5
   |
LL |     b::baz::<fn() -> dyn A>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:68:5
   |
LL |     c::foo::<fn() -> dyn A>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:69:14
   |
LL |     c::bar::<fn() -> dyn A, _>();
   |              ^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `c::bar`
  --> $DIR/closure-return-type-must-be-sized.rs:42:19
   |
LL |     pub fn bar<F: FnMut() -> R, R: ?Sized>() {}
   |                   ^^^^^^^^^^^^ required by this bound in `c::bar`

error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
  --> $DIR/closure-return-type-must-be-sized.rs:70:5
   |
LL |     c::baz::<fn() -> dyn A>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
   = note: required because it appears within the type `fn() -> dyn A`

error: aborting due to 9 previous errors

For more information about this error, try `rustc --explain E0277`.