Fix hints from misc_early
This commit is contained in:
parent
5dbdfc1836
commit
9b78086ab3
2 changed files with 6 additions and 6 deletions
|
|
@ -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')),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue