File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -3891,6 +3891,25 @@ details.
38913891[issue #33685]: https://github.com/rust-lang/rust/issues/33685
38923892"## ,
38933893
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+
38943913E0588 : r##"
38953914A type with `packed` representation hint has a field with `align`
38963915representation hint.
@@ -5098,7 +5117,6 @@ struct B<const X: A>; // ok!
50985117// E0563, // cannot determine a type for this `impl Trait` removed in 6383de15
50995118// E0564, // only named lifetimes are allowed in `impl Trait`,
51005119 // but `{}` was found in the type `{}`
5101- E0587 , // type has conflicting packed and align representation hints
51025120// E0611, // merged into E0616
51035121// E0612, // merged into E0609
51045122// E0613, // Removed (merged with E0609)
Original file line number Diff line number Diff line change @@ -66,4 +66,5 @@ LL | | }
6666
6767error: aborting due to 8 previous errors
6868
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