]> git.lizzy.rs Git - rust.git/commitdiff
compiler: Fix E0587 explanation
authorSamuel Ortiz <sameo@rivosinc.com>
Fri, 27 Jan 2023 09:58:58 +0000 (10:58 +0100)
committerSamuel Ortiz <sameo@rivosinc.com>
Fri, 27 Jan 2023 09:59:51 +0000 (10:59 +0100)
We meant to use 8 as the packed argument.

Signed-off-by: Samuel Ortiz <sameo@rivosinc.com>
compiler/rustc_error_codes/src/error_codes/E0587.md

index ee9031dc3796c7a8189acc76dc2117337ed53b9d..d7998af85b94fc71c9c142abe46b9bbb9c4a06e6 100644 (file)
@@ -11,6 +11,6 @@ You cannot use `packed` and `align` hints on a same type. If you want to pack a
 type to a given size, you should provide a size to packed:
 
 ```
-#[repr(packed)] // ok!
+#[repr(packed(8))] // ok!
 struct Umbrella(i32);
 ```