aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pin_project/project_replace_unsized.stderr
blob: 86cc14889ff7e94225b0b5eb07e49437dd138ce7 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
error[E0277]: the size for values of type `T` cannot be known at compilation time
 --> tests/ui/pin_project/project_replace_unsized.rs:3:15
  |
3 | #[pin_project(project_replace)] //~ ERROR E0277
  |               ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
4 | struct Struct<T: ?Sized> {
  |               - this type parameter needs to be `std::marker::Sized`
  |
note: required because it appears within the type `Struct<T>`
 --> tests/ui/pin_project/project_replace_unsized.rs:4:8
  |
4 | struct Struct<T: ?Sized> {
  |        ^^^^^^
  = help: unsized fn params are gated as an unstable feature
help: consider removing the `?Sized` bound to make the type parameter `Sized`
  |
4 - struct Struct<T: ?Sized> {
4 + struct Struct<T> {
  |
help: function arguments must have a statically known size, borrowed types always have a known size
  |
3 | #[pin_project(&project_replace)] //~ ERROR E0277
  |               +

error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> tests/ui/pin_project/project_replace_unsized.rs:3:1
    |
3   | #[pin_project(project_replace)] //~ ERROR E0277
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
4   | struct Struct<T: ?Sized> {
    |               - this type parameter needs to be `std::marker::Sized`
    |
note: required because it appears within the type `Struct<T>`
   --> tests/ui/pin_project/project_replace_unsized.rs:4:8
    |
4   | struct Struct<T: ?Sized> {
    |        ^^^^^^
note: required by a bound in `UnsafeOverwriteGuard::<T>::new`
   --> src/lib.rs
    |
    |     impl<T> UnsafeOverwriteGuard<T> {
    |          ^ required by this bound in `UnsafeOverwriteGuard::<T>::new`
    = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
4   - struct Struct<T: ?Sized> {
4   + struct Struct<T> {
    |

error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> tests/ui/pin_project/project_replace_unsized.rs:5:5
    |
3   | #[pin_project(project_replace)] //~ ERROR E0277
    | ------------------------------- required by a bound introduced by this call
4   | struct Struct<T: ?Sized> {
    |               - this type parameter needs to be `std::marker::Sized`
5   |     f: T,
    |     ^ doesn't have a size known at compile-time
    |
note: required by a bound in `std::ptr::read`
   --> $RUST/core/src/ptr/mod.rs
    |
    | pub const unsafe fn read<T>(src: *const T) -> T {
    |                          ^ required by this bound in `std::ptr::read`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
4   - struct Struct<T: ?Sized> {
4   + struct Struct<T> {
    |

error[E0277]: the size for values of type `T` cannot be known at compilation time
 --> tests/ui/pin_project/project_replace_unsized.rs:8:15
  |
8 | #[pin_project(project_replace)] //~ ERROR E0277
  |               ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
9 | struct TupleStruct<T: ?Sized>(T);
  |                    - this type parameter needs to be `std::marker::Sized`
  |
note: required because it appears within the type `TupleStruct<T>`
 --> tests/ui/pin_project/project_replace_unsized.rs:9:8
  |
9 | struct TupleStruct<T: ?Sized>(T);
  |        ^^^^^^^^^^^
  = help: unsized fn params are gated as an unstable feature
help: consider removing the `?Sized` bound to make the type parameter `Sized`
  |
9 - struct TupleStruct<T: ?Sized>(T);
9 + struct TupleStruct<T>(T);
  |
help: function arguments must have a statically known size, borrowed types always have a known size
  |
8 | #[pin_project(&project_replace)] //~ ERROR E0277
  |               +

error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> tests/ui/pin_project/project_replace_unsized.rs:8:1
    |
8   | #[pin_project(project_replace)] //~ ERROR E0277
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
9   | struct TupleStruct<T: ?Sized>(T);
    |                    - this type parameter needs to be `std::marker::Sized`
    |
note: required because it appears within the type `TupleStruct<T>`
   --> tests/ui/pin_project/project_replace_unsized.rs:9:8
    |
9   | struct TupleStruct<T: ?Sized>(T);
    |        ^^^^^^^^^^^
note: required by a bound in `UnsafeOverwriteGuard::<T>::new`
   --> src/lib.rs
    |
    |     impl<T> UnsafeOverwriteGuard<T> {
    |          ^ required by this bound in `UnsafeOverwriteGuard::<T>::new`
    = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
9   - struct TupleStruct<T: ?Sized>(T);
9   + struct TupleStruct<T>(T);
    |