-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add long error explanation for E0693 #61137
- Loading branch information
Ayush Kumar Mishra
committed
Mar 14, 2020
1 parent
3dbade6
commit 1c88052
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