summary refs log tree commit diff
path: root/src/test/ui/unsized5.stderr
blob: de4da309791c0d5a928e510f27c52292476c571f (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
error[E0277]: the size for values of type `X` cannot be known at compilation time
  --> $DIR/unsized5.rs:4:5
   |
LL | struct S1<X: ?Sized> {
   |           - this type parameter needs to be `std::marker::Sized`
LL |     f1: X,
   |     ^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `X`
   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = note: only the last field of a struct may have a dynamically sized type

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

error[E0277]: the size for values of type `str` cannot be known at compilation time
  --> $DIR/unsized5.rs:15:5
   |
LL |     f: str,
   |     ^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `str`
   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = note: only the last field of a struct may have a dynamically sized type

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> $DIR/unsized5.rs:20:5
   |
LL |     f: [u8],
   |     ^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `[u8]`
   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = note: only the last field of a struct may have a dynamically sized type

error[E0277]: the size for values of type `X` cannot be known at compilation time
  --> $DIR/unsized5.rs:25:8
   |
LL | enum E<X: ?Sized> {
   |        - this type parameter needs to be `std::marker::Sized`
LL |     V1(X, isize),
   |        ^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `X`
   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = note: no field of an enum variant may have a dynamically sized type

error[E0277]: the size for values of type `X` cannot be known at compilation time
  --> $DIR/unsized5.rs:29:8
   |
LL | enum F<X: ?Sized> {
   |        - this type parameter needs to be `std::marker::Sized`
LL |     V2{f1: X, f: isize},
   |        ^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `X`
   = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
   = note: no field of an enum variant may have a dynamically sized type

error: aborting due to 6 previous errors

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