We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
repr
1 parent 48e45ee commit 451eb66Copy full SHA for 451eb66
src/librustc_lint/builtin.rs
@@ -696,7 +696,9 @@ impl EarlyLintPass for BadRepr {
696
let mut warn = if let Some(ref lit) = attr.value_str() {
697
// avoid warning about empty `repr` on `#[repr = "foo"]`
698
let sp = match format!("{}", lit).as_ref() {
699
- "C" | "packed" | "rust" | "u*" | "i*" | "transparent" => {
+ | "C" | "packed" | "rust" | "transparent"
700
+ | "u8" | "u16" | "u32" | "u64" | "u128"
701
+ | "i8" | "i16" | "i32" | "i64" | "i128" => {
702
let lo = attr.span.lo() + BytePos(2);
703
let hi = attr.span.hi() - BytePos(1);
704
suggested = true;
0 commit comments