@@ -34,6 +34,15 @@ LL | offset_of!(Delta<Extern>, z);
3434 = help: the trait `Sized` is not implemented for `Extern`
3535 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
3636
37+ error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
38+ --> $DIR/offset-of-dst-field.rs:44:5
39+ |
40+ LL | offset_of!(Delta<dyn Trait>, z);
41+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
42+ |
43+ = help: the trait `Sized` is not implemented for `dyn Trait`
44+ = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
45+
3746error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
3847 --> $DIR/offset-of-dst-field.rs:42:5
3948 |
@@ -49,7 +58,7 @@ LL | struct Alpha {
4958 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
5059
5160error[E0277]: the size for values of type `T` cannot be known at compilation time
52- --> $DIR/offset-of-dst-field.rs:47 :5
61+ --> $DIR/offset-of-dst-field.rs:48 :5
5362 |
5463LL | fn generic_with_maybe_sized<T: ?Sized>() -> usize {
5564 | - this type parameter needs to be `std::marker::Sized`
@@ -63,6 +72,6 @@ LL - fn generic_with_maybe_sized<T: ?Sized>() -> usize {
6372LL + fn generic_with_maybe_sized<T>() -> usize {
6473 |
6574
66- error: aborting due to 6 previous errors
75+ error: aborting due to 7 previous errors
6776
6877For more information about this error, try `rustc --explain E0277`.
0 commit comments