bors[bot]
7e417d4cbd
Merge #3353
...
3353: float support added for mistyped_literal_suffixes lint r=mikerite a=Maxgy
I implemented the mistyped_literal_suffixes lint for float literals.
```
#![allow(unused_variables)]
fn main() {
let x = 1E2_32;
let x = 75.22_64;
}
```
Given the above, the additional check suggests the variables to be written as `let x = 1E2_f32` and `let x = 75.22_f64`.
Fixes #3167
Co-authored-by: Maxwell Anderson <maxwell.brayden.anderson@gmail.com>
2018-11-05 03:58:15 +00:00
Maxwell Anderson
3e0de1745d
changed into_iter to iter and fixed a lint check
2018-11-04 10:39:54 -07:00
kennytm
2b2acf1002
Fix dogfood error.
2018-11-02 22:53:57 +08:00
Maxwell Anderson
b6b97e5c1f
format code
2018-11-01 15:43:40 -06:00
Maxwell Anderson
02340cc891
fix comment spacing
2018-11-01 12:35:01 -06:00
Maxwell Anderson
98ce3348d9
change single char str to char
2018-10-31 18:09:56 -06:00
Maxwell Anderson
f4b919cad7
add lint to lintarray macro
2018-10-31 16:48:24 -06:00
Maxwell Anderson
6b895b8267
Revert "small fix"
...
This reverts commit b1abc81a60
.
2018-10-31 16:39:12 -06:00
flip1995
1e43c3bb9f
Register MISTYPED_LITERAL_SUFFIXES lint
2018-10-29 20:54:21 +01:00
Maxwell Anderson
b1abc81a60
small fix
2018-10-23 16:35:09 -06:00
Maxwell Anderson
6a695ffb3d
added float support for mistyped literal lints
2018-10-23 15:54:27 -06:00
Maxwell Anderson
9fad38dca9
tmp progress
2018-10-11 22:15:01 -06:00
Manish Goregaokar
e9c025ea70
Add license header to Rust files
2018-10-06 09:43:08 -07:00
Eduard-Mihai Burtescu
9219fc6c5c
Reintroduce extern crate
for non-Cargo dependencies.
2018-09-15 11:10:51 +03:00
Michael A. Plikk
7bf8d8ba09
Simplified boolean expression for checking literal suffixes
2018-09-06 17:19:38 +02:00
Michael A. Plikk
986c772c24
Reduce number of split_at calls
2018-09-06 16:26:17 +02:00
Michael A. Plikk
38d287fecd
Add lint for misstyped literal casting
2018-09-05 19:46:49 +02:00
flip1995
8c07772dbb
Switch to declare_tool_lint macro
2018-08-29 11:08:29 -07:00
Oliver Schneider
d99cea0f16
Update imports and rustup
2018-08-28 13:13:42 +02:00
Dale Wijnand
a1cce2d06a
Inline utils::in_external_macro
2018-07-24 10:38:58 +01:00
Oliver Schneider
afd91248ed
Rustup
2018-07-23 13:01:12 +02:00
Manish Goregaokar
5918a3fc1e
Remove import of if_chain
2018-07-20 00:50:02 -07:00
Manish Goregaokar
5d74e2096b
Remove import of rustc
2018-07-19 00:53:23 -07:00
Mateusz Mikuła
a6601f2d02
Enable rust_2018_idioms warning
2018-06-25 20:56:25 +02:00
Wim Looman
621fdcc3bc
Dogfood new trivially_copy_pass_by_ref lint
2018-06-15 16:53:34 +02:00
Oliver Schneider
c6d53ad2c0
Merge pull request #2813 from terry90/master
...
unreadable_literal: Fills hexadecimal values with 0 to allow better grouping
2018-06-03 12:53:45 +02:00
Terry Raimondo
2c1451817c
Compute digits vec only once
2018-06-03 12:26:50 +02:00
Mateusz Mikuła
424a33720d
Run rustfix
2018-05-30 10:15:50 +02:00
Terry Raimondo
b81fd202a0
Add tests
...
Fix tests
2018-05-28 14:23:06 +02:00
Terry Raimondo
2033a1eb0e
unreadable_literal: Fills hexadecimal values with 0 to allow grouping (c.f #2300 )
2018-05-28 13:55:27 +02:00
Evan Simmons
d4b536f540
Fix 1x..x.0 false positive, pretty suggestion
2018-05-05 09:45:14 -07:00
Oliver Schneider
d6344c47e3
Categorize all the lints!
2018-03-28 15:24:26 +02:00
Mateusz Mikuła
cfb9b982c5
Apply clippy suggestions
...
Signed-off-by: Mateusz Mikuła <mati865@gmail.com>
2018-03-16 10:54:49 +01:00
Niklas Fiekas
d55890a2b1
Increase unreadable_literal digits ( fixes #1958 )
2018-03-06 14:24:01 +01:00
flip1995
86ce897084
Fix unreadable_literal lint for scientific float notation
2018-03-04 16:28:34 +01:00
Alex Butler
42000c6cf9
Fix #2494 add suggestion for unreadable_literal
...
Add `rustc --explain E0308` line to relevant tests
2018-03-01 15:26:39 +00:00
flip1995
63a7daf78c
Make decimal_literal_representation a restriction lint
2018-02-06 13:05:20 +01:00
flip1995
600147926b
Apply requested changes
2018-01-23 15:29:31 +01:00
flip1995
23f90afa1b
Add configurable threshold, default: 4096
2018-01-23 12:34:40 +01:00
flip1995
647da97622
Lint for numeric literals that have a better representation in another format
2018-01-16 14:01:07 +01:00