aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pin_project/project_replace_unsized.stderr
blob: c3a3be7dd3139827ec3cd31f2b0345ad4e4472f1 (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
error[E0277]: the size for values of type `T` cannot be known at compilation time
 --> $DIR/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`
  |
  = help: within `Struct<T>`, the trait `std::marker::Sized` is not implemented for `T`
  = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
  = note: required because it appears within the type `Struct<T>`
  = note: all local variables must have a statically known size
  = help: unsized locals are gated as an unstable feature

error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/project_replace_unsized.rs:5:5
    |
4   | struct Struct<T: ?Sized> {
    |               - this type parameter needs to be `std::marker::Sized`
5   |     x: T,
    |     ^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `T`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>

error[E0277]: the size for values of type `T` cannot be known at compilation time
 --> $DIR/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`
  |
  = help: within `__StructProjectionOwned<T>`, the trait `std::marker::Sized` is not implemented for `T`
  = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
  = note: required because it appears within the type `__StructProjectionOwned<T>`
  = note: structs must have a statically known size to be initialized
  = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `T` cannot be known at compilation time
 --> $DIR/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`
  |
  = help: within `TupleStruct<T>`, the trait `std::marker::Sized` is not implemented for `T`
  = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
  = note: required because it appears within the type `TupleStruct<T>`
  = note: all local variables must have a statically known size
  = help: unsized locals are gated as an unstable feature

error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> $DIR/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`
    |
    = help: the trait `std::marker::Sized` is not implemented for `T`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `T` cannot be known at compilation time
 --> $DIR/project_replace_unsized.rs:9:8
  |
9 | struct TupleStruct<T: ?Sized>(T);
  |        ^^^^^^^^^^^ - this type parameter needs to be `std::marker::Sized`
  |        |
  |        doesn't have a size known at compile-time
  |
  = help: the trait `std::marker::Sized` is not implemented for `T`
  = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
  = note: all function arguments must have a statically known size
  = help: unsized locals are gated as an unstable feature