File tree 2 files changed +21
-2
lines changed
2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -3891,6 +3891,25 @@ details.
3891
3891
[issue #33685]: https://github.com/rust-lang/rust/issues/33685
3892
3892
"## ,
3893
3893
3894
+ E0587 : r##"
3895
+ A type has both `packed` and `align` representation hints.
3896
+
3897
+ Erroneous code example:
3898
+
3899
+ ```compile_fail,E0587
3900
+ #[repr(packed, align(8))] // error!
3901
+ struct Umbrella(i32);
3902
+ ```
3903
+
3904
+ You cannot use `packed` and `align` hints on a same type. If you want to pack a
3905
+ type to a given size, you should provide a size to packed:
3906
+
3907
+ ```
3908
+ #[repr(packed)] // ok!
3909
+ struct Umbrella(i32);
3910
+ ```
3911
+ "## ,
3912
+
3894
3913
E0588 : r##"
3895
3914
A type with `packed` representation hint has a field with `align`
3896
3915
representation hint.
@@ -5098,7 +5117,6 @@ struct B<const X: A>; // ok!
5098
5117
// E0563, // cannot determine a type for this `impl Trait` removed in 6383de15
5099
5118
// E0564, // only named lifetimes are allowed in `impl Trait`,
5100
5119
// but `{}` was found in the type `{}`
5101
- E0587 , // type has conflicting packed and align representation hints
5102
5120
// E0611, // merged into E0616
5103
5121
// E0612, // merged into E0609
5104
5122
// E0613, // Removed (merged with E0609)
Original file line number Diff line number Diff line change @@ -66,4 +66,5 @@ LL | | }
66
66
67
67
error: aborting due to 8 previous errors
68
68
69
- For more information about this error, try `rustc --explain E0566`.
69
+ Some errors have detailed explanations: E0566, E0587.
70
+ For more information about an error, try `rustc --explain E0566`.
You can’t perform that action at this time.
0 commit comments