Fix hints from misc_early

This commit is contained in:
Jay Hardee 2017-07-31 20:20:27 -04:00
parent 5dbdfc1836
commit 9b78086ab3
2 changed files with 6 additions and 6 deletions

View file

@ -367,12 +367,12 @@ impl MiscEarly {
db.span_suggestion(
lit.span,
"if you mean to use a decimal constant, remove the `0` to remove confusion",
src.trim_left_matches('0').to_string(),
src.trim_left_matches(|c| c == '_' || c == '0').to_string(),
);
db.span_suggestion(
lit.span,
"if you mean to use an octal constant, use `0o`",
format!("0o{}", src.trim_left_matches('0')),
format!("0o{}", src.trim_left_matches(|c| c == '_' || c == '0')),
);
});
}