-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #69993 - ayushmishra2005:doc/61137-add-long-error-cod…
…e-e0693, r=Dylan-DPC Add long error explanation for E0693 Add long explanation for the E0693 error code Part of #61137 r? @GuillaumeGomez
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
`align` representation hint was incorrectly declared. | ||
|
||
Erroneous code examples: | ||
|
||
```compile_fail,E0693 | ||
#[repr(align=8)] // error! | ||
struct Align8(i8); | ||
#[repr(align="8")] // error! | ||
struct Align8(i8); | ||
``` | ||
|
||
This is a syntax error at the level of attribute declarations. The proper | ||
syntax for `align` representation hint is the following: | ||
|
||
``` | ||
#[repr(align(8))] // ok! | ||
struct Align8(i8); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters