Skip to content

Commit 623d8c4

Browse files
authored
Rollup merge of #4811 - mikerite:lit_repr_20191113, r=flip1995
Literal Representation Restructure This pull request restructures the literal_representation module to be easier to understand and maintain. I split the changes into a lot of commits to make reviewing easier. changelog: none
2 parents 93d84d7 + ceb0b2d commit 623d8c4

12 files changed

+393
-266
lines changed

clippy_lints/src/excessive_precision.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::utils::span_lint_and_sugg;
2+
use crate::utils::sugg::format_numeric_literal;
23
use if_chain::if_chain;
34
use rustc::hir;
45
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
@@ -86,8 +87,7 @@ impl ExcessivePrecision {
8687
if sym_str == s {
8788
None
8889
} else {
89-
let di = super::literal_representation::DigitInfo::new(&s, true);
90-
Some(di.grouping_hint())
90+
Some(format_numeric_literal(&s, None, true))
9191
}
9292
} else {
9393
None

0 commit comments

Comments
 (0)