-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add list of recognized repr attributes to the unrecognized repr error
- Loading branch information
1 parent
9ba169a
commit ad275f5
Showing
5 changed files
with
67 additions
and
12 deletions.
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
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,17 @@ | ||
#![crate_type = "lib"] | ||
|
||
#[repr(uwu)] //~ERROR: unrecognized representation hint | ||
pub struct OwO; | ||
|
||
#[repr(uwu = "a")] //~ERROR: unrecognized representation hint | ||
pub struct OwO2(i32); | ||
|
||
#[repr(uwu(4))] //~ERROR: unrecognized representation hint | ||
pub struct OwO3 { | ||
x: i32, | ||
} | ||
|
||
#[repr(uwu, u8)] //~ERROR: unrecognized representation hint | ||
pub enum OwO4 { | ||
UwU = 1, | ||
} |
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,35 @@ | ||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:3:8 | ||
| | ||
LL | #[repr(uwu)] | ||
| ^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:6:8 | ||
| | ||
LL | #[repr(uwu = "a")] | ||
| ^^^^^^^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:9:8 | ||
| | ||
LL | #[repr(uwu(4))] | ||
| ^^^^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error[E0552]: unrecognized representation hint | ||
--> $DIR/invalid_repr_list_help.rs:14:8 | ||
| | ||
LL | #[repr(uwu, u8)] | ||
| ^^^ | ||
| | ||
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0552`. |