mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
Merge pull request #1203 from Manishearth/octal
Fix FP in `ZERO_PREFIXED_LITERAL` and `0b`/`Oo`
This commit is contained in:
commit
39d4a1b323
@ -1,6 +1,9 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 0.0.87 — ??
|
||||
* Fix FP in [`zero_prefixed_literal`] and `0b`/`Oo`
|
||||
|
||||
## 0.0.86 — 2016-08-28
|
||||
* Rustup to *rustc 1.13.0-nightly (a23064af5 2016-08-27)*
|
||||
* New lints: [`missing_docs_in_private_items`], [`zero_prefixed_literal`]
|
||||
|
@ -287,6 +287,8 @@ impl EarlyLintPass for MiscEarly {
|
||||
span_lint(cx, MIXED_CASE_HEX_LITERALS, lit.span,
|
||||
"inconsistent casing in hexadecimal literal");
|
||||
}
|
||||
} else if src.starts_with("0b") || src.starts_with("0o") {
|
||||
/* nothing to do */
|
||||
} else if value != 0 && src.starts_with('0') {
|
||||
span_lint_and_then(cx,
|
||||
ZERO_PREFIXED_LITERAL,
|
||||
|
@ -32,4 +32,7 @@ fn main() {
|
||||
//~|SUGGESTION = 123;
|
||||
//~|HELP use `0o`
|
||||
//~|SUGGESTION = 0o123;
|
||||
|
||||
let ok11 = 0o123;
|
||||
let ok12 = 0b101010;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user