11error[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
33 |
44LL | offset_of!(Alpha, z);
55 | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -8,7 +8,7 @@ LL | offset_of!(Alpha, z);
88 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
99
1010error[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
1212 |
1313LL | offset_of!(Beta, z);
1414 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -17,14 +17,52 @@ LL | offset_of!(Beta, z);
1717 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
1818
1919error[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
2121 |
2222LL | offset_of!(Gamma, z);
2323 | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
2424 |
2525 = help: the trait `Sized` is not implemented for `Extern`
2626 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
2727
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
2967
3068For more information about this error, try `rustc --explain E0277`.
0 commit comments