diff options
Diffstat (limited to 'src/docs/excessive_precision.txt')
| -rw-r--r-- | src/docs/excessive_precision.txt | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/docs/excessive_precision.txt b/src/docs/excessive_precision.txt deleted file mode 100644 index 517879c4715..00000000000 --- a/src/docs/excessive_precision.txt +++ /dev/null @@ -1,18 +0,0 @@ -### What it does -Checks for float literals with a precision greater -than that supported by the underlying type. - -### Why is this bad? -Rust will truncate the literal silently. - -### Example -``` -let v: f32 = 0.123_456_789_9; -println!("{}", v); // 0.123_456_789 -``` - -Use instead: -``` -let v: f64 = 0.123_456_789_9; -println!("{}", v); // 0.123_456_789_9 -``` \ No newline at end of file |
