1
1
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2
- --> $DIR/offset-of-dst-field.rs:30 :5
2
+ --> $DIR/offset-of-dst-field.rs:36 :5
3
3
|
4
4
LL | offset_of!(Alpha, z);
5
5
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -8,7 +8,7 @@ LL | offset_of!(Alpha, z);
8
8
= note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
9
9
10
10
error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
11
- --> $DIR/offset-of-dst-field.rs:31 :5
11
+ --> $DIR/offset-of-dst-field.rs:37 :5
12
12
|
13
13
LL | offset_of!(Beta, z);
14
14
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -17,14 +17,52 @@ LL | offset_of!(Beta, z);
17
17
= note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
18
18
19
19
error[E0277]: the size for values of type `Extern` cannot be known at compilation time
20
- --> $DIR/offset-of-dst-field.rs:32 :5
20
+ --> $DIR/offset-of-dst-field.rs:38 :5
21
21
|
22
22
LL | offset_of!(Gamma, z);
23
23
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
24
24
|
25
25
= help: the trait `Sized` is not implemented for `Extern`
26
26
= note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
27
27
28
- error: aborting due to 3 previous errors
28
+ error[E0277]: the size for values of type `Extern` cannot be known at compilation time
29
+ --> $DIR/offset-of-dst-field.rs:43:5
30
+ |
31
+ LL | offset_of!(Delta<Extern>, z);
32
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
33
+ |
34
+ = help: the trait `Sized` is not implemented for `Extern`
35
+ = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
36
+
37
+ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
38
+ --> $DIR/offset-of-dst-field.rs:42:5
39
+ |
40
+ LL | offset_of!(Delta<Alpha>, z);
41
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
42
+ |
43
+ = help: within `Alpha`, the trait `Sized` is not implemented for `[u8]`
44
+ note: required because it appears within the type `Alpha`
45
+ --> $DIR/offset-of-dst-field.rs:5:8
46
+ |
47
+ LL | struct Alpha {
48
+ | ^^^^^
49
+ = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
50
+
51
+ error[E0277]: the size for values of type `T` cannot be known at compilation time
52
+ --> $DIR/offset-of-dst-field.rs:47:5
53
+ |
54
+ LL | fn generic_with_maybe_sized<T: ?Sized>() -> usize {
55
+ | - this type parameter needs to be `std::marker::Sized`
56
+ LL | offset_of!(Delta<T>, z)
57
+ | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
58
+ |
59
+ = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
60
+ help: consider removing the `?Sized` bound to make the type parameter `Sized`
61
+ |
62
+ LL - fn generic_with_maybe_sized<T: ?Sized>() -> usize {
63
+ LL + fn generic_with_maybe_sized<T>() -> usize {
64
+ |
65
+
66
+ error: aborting due to 6 previous errors
29
67
30
68
For more information about this error, try `rustc --explain E0277`.
0 commit comments