@@ -25,8 +25,17 @@ LL | offset_of!(Gamma, z);
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[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
29+ --> $DIR/offset-of-dst-field.rs:40:5
30+ |
31+ LL | offset_of!((u8, dyn Trait), 1);
32+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
33+ |
34+ = help: the trait `Sized` is not implemented for `dyn Trait`
35+ = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
36+
2837error[E0277]: the size for values of type `Extern` cannot be known at compilation time
29- --> $DIR/offset-of-dst-field.rs:43 :5
38+ --> $DIR/offset-of-dst-field.rs:45 :5
3039 |
3140LL | offset_of!(Delta<Extern>, z);
3241 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -35,7 +44,7 @@ LL | offset_of!(Delta<Extern>, z);
3544 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
3645
3746error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
38- --> $DIR/offset-of-dst-field.rs:44 :5
47+ --> $DIR/offset-of-dst-field.rs:46 :5
3948 |
4049LL | offset_of!(Delta<dyn Trait>, z);
4150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -44,7 +53,7 @@ LL | offset_of!(Delta<dyn Trait>, z);
4453 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
4554
4655error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
47- --> $DIR/offset-of-dst-field.rs:42 :5
56+ --> $DIR/offset-of-dst-field.rs:44 :5
4857 |
4958LL | offset_of!(Delta<Alpha>, z);
5059 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -58,7 +67,7 @@ LL | struct Alpha {
5867 = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
5968
6069error[E0277]: the size for values of type `T` cannot be known at compilation time
61- --> $DIR/offset-of-dst-field.rs:48 :5
70+ --> $DIR/offset-of-dst-field.rs:50 :5
6271 |
6372LL | fn generic_with_maybe_sized<T: ?Sized>() -> usize {
6473 | - this type parameter needs to be `std::marker::Sized`
@@ -72,6 +81,6 @@ LL - fn generic_with_maybe_sized<T: ?Sized>() -> usize {
7281LL + fn generic_with_maybe_sized<T>() -> usize {
7382 |
7483
75- error: aborting due to 7 previous errors
84+ error: aborting due to 8 previous errors
7685
7786For more information about this error, try `rustc --explain E0277`.
0 commit comments