We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d247ad commit c647735Copy full SHA for c647735
compiler/rustc_lint/src/types.rs
@@ -145,9 +145,9 @@ fn lint_overflowing_range_endpoint<'tcx>(
145
// We need to preserve the literal's suffix,
146
// as it may determine typing information.
147
let suffix = match lit.node {
148
- LitKind::Int(_, LitIntType::Signed(s)) => s.name_str().to_string(),
149
- LitKind::Int(_, LitIntType::Unsigned(s)) => s.name_str().to_string(),
150
- LitKind::Int(_, LitIntType::Unsuffixed) => "".to_string(),
+ LitKind::Int(_, LitIntType::Signed(s)) => s.name_str(),
+ LitKind::Int(_, LitIntType::Unsigned(s)) => s.name_str(),
+ LitKind::Int(_, LitIntType::Unsuffixed) => "",
151
_ => bug!(),
152
};
153
let suggestion = format!("{}..={}{}", start, lit_val - 1, suffix);
0 commit comments