Skip to content

Commit 451eb66

Browse files
committed
Expand (fix) u* and i* repr hints
1 parent 48e45ee commit 451eb66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_lint/builtin.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,9 @@ impl EarlyLintPass for BadRepr {
696696
let mut warn = if let Some(ref lit) = attr.value_str() {
697697
// avoid warning about empty `repr` on `#[repr = "foo"]`
698698
let sp = match format!("{}", lit).as_ref() {
699-
"C" | "packed" | "rust" | "u*" | "i*" | "transparent" => {
699+
| "C" | "packed" | "rust" | "transparent"
700+
| "u8" | "u16" | "u32" | "u64" | "u128"
701+
| "i8" | "i16" | "i32" | "i64" | "i128" => {
700702
let lo = attr.span.lo() + BytePos(2);
701703
let hi = attr.span.hi() - BytePos(1);
702704
suggested = true;

0 commit comments

Comments
 (0)