Karim SENHAJI
f9e4f5695d
Limit commutative assign op lint to primitive types
2018-10-10 19:10:44 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
f6882ede4d
Merge pull request #3287 from JoshMcguigan/cmp_owned-2925
...
cmp_owned false positive
2018-10-09 10:01:31 +02:00
Josh Mcguigan
ad5c29a445
Fixes #2925 cmp_owned false positive
2018-10-08 19:04:29 -07:00
Matthias Krüger
a578cb2d62
if_let_redundant_pattern_matching: use Span.to() instead of Span.with_hi() to fix crash.
...
Fixes #3064
2018-10-08 17:34:43 +02:00
Rotem Yaari
1ef32e4096
Improve diagnostics in case of lifetime elision ( closes #3284 )
2018-10-08 13:07:21 +03:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
02705d4cf5
Merge pull request #3282 from JoshMcguigan/excessive_precision-2840
...
Fix excessive_precision false positive
2018-10-08 08:24:13 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
ce2da2c04f
Merge pull request #3283 from etaoins/dont-suggest-cloned-for-map-box-deref
...
Don't suggest cloned() for map Box deref
2018-10-08 08:21:59 +02:00
Philipp Hansch
41e94dd072
Merge pull request #3285 from devonhollowood/pedantic-dogfood-items-after-statements
...
Pedantic dogfood: `items_after_statements`
2018-10-08 06:59:55 +01:00
Devon Hollowood
82638e4dd4
Fix items_after_statements for const
s
2018-10-07 17:09:32 -07:00
Devon Hollowood
be983fbf52
Fix items_after_statements for sub-functions
2018-10-07 17:09:32 -07:00
Devon Hollowood
6528749083
Fix items_after_statements for use
statements
2018-10-07 17:09:32 -07:00
Ryan Cumming
9bd4e5469e
Don't suggest cloned() for map Box deref
...
Boxes are a bit magic in that they need to use `*` to get an owned value
out of the box. They implement `Deref` but that only returns a
reference. This means an easy way to convert an `Option<Box<T>>` to an
`<Option<T>` is:
```
box_option.map(|b| *b)
```
However, since b36bb0a6
the `map_clone` lint is detecting this as an
attempt to copy the box. Fix by excluding boxes completely from the
deref part of this lint.
Fixes #3274
2018-10-08 06:20:32 +11:00
Josh Mcguigan
8a77a25b8a
Fix excessive_precision false positive
2018-10-07 11:38:20 -07:00
Philipp Hansch
63ceabf0cf
Merge pull request #3280 from d-dorazio/fix-new_without_default-should-not-fire-unsafe-new
...
new_without_default should not warn about unsafe new
2018-10-07 13:09:37 +01:00
Manish Goregaokar
5dcb90e29d
Merge pull request #3279 from phansch/fix_fp_in_fn_to_numeric_cast_with_truncation
...
Fix FP in `fn_to_numeric_cast_with_truncation`
2018-10-07 04:27:51 -07:00
Philipp Hansch
d365742bc6
Fix FP in fn_to_numeric_cast_with_truncation
...
We only want this lint to check casts to numeric, as per the lint title.
Rust already has a built-in check for all other casts
[here][rust_check].
[rust_check]: 5472b0718f/src/librustc_typeck/check/cast.rs (L430-L433)
2018-10-07 12:50:36 +02:00
Daniele D'Orazio
59c4ff77f1
new_without_default should not warn about unsafe new
2018-10-07 12:39:54 +02:00
Dylan Maccora
d129d049c6
Adding more detail to filter_map lint documentation.
2018-10-07 11:24:09 +11:00
Manish Goregaokar
e9c025ea70
Add license header to Rust files
2018-10-06 09:43:08 -07:00
Manish Goregaokar
53d41e5c50
Rustup for https://github.com/rust-lang/rust/pull/54741
2018-10-05 13:41:40 -07:00
Manish Goregaokar
cbde8201c5
Remove unused utils
2018-10-05 13:26:39 -07:00
Manish Goregaokar
75965030c7
Merge pull request #3251 from rust-lang-nursery/relicense-rewrite
...
[do not merge] Relicensing rewrite
2018-10-05 20:14:55 +02:00
Philipp Hansch
1544a1a681
Merge remote-tracking branch 'origin/master' into relicense-rewrite
2018-10-05 07:18:24 +02:00
Joel Gallant
163780ee0b
Solves #3222 by checking the BareFnTy Abi type
2018-10-04 18:49:03 -06:00
Philipp Hansch
391d53db66
Add hidden lifetime parameters to fix warning
2018-10-04 21:59:30 +02:00
Philipp Hansch
c0ab8b2531
Reimplement the fn_to_numeric_cast_with_truncation
lint
2018-10-04 21:44:16 +02:00
Philipp Hansch
7adf24ebb0
Improve docs of fn_to_numeric_cast
...
Closes #2980
2018-10-04 18:09:09 +02:00
Matthias Krüger
fd5ea0ddf7
resolve build warnings in clippy_lints/src/format.rs
2018-10-04 16:34:41 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
c3e3be374b
Merge pull request #3256 from rust-lang-nursery/fix-2796
...
Fix 2796 and 3020
2018-10-04 08:51:00 +02:00
mcarton
5173ed0c03
Don't suggest to_string().to_string
in USELESS_FORMAT
2018-10-03 20:59:59 +02:00
Philipp Hansch
f42272102a
Reimplement the fn_to_numeric_cast
lint
2018-10-03 12:02:06 +02:00
Manish Goregaokar
c430147942
Fix push_item_path call (rustup to 4cf11765dc98536c6eedf33f2df7f72f6e161263)
2018-10-03 02:06:26 -07:00
mcarton
7eebd5b20c
Ignore format!
with precision in USELESS_FORMAT
2018-10-02 23:57:22 +02:00
Oliver Schneider
913a5c9b56
Trailing newline
2018-10-02 15:18:56 +02:00
Oliver Schneider
696dc369df
FIx dogfood
2018-10-02 15:17:56 +02:00
Oliver Schneider
b36bb0a68d
Reimplement the map_clone
lint from scratch
2018-10-02 15:13:43 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
11cc8472a9
Merge pull request #3245 from JoshMcguigan/wrong_self_convention-1530
...
Correct false positive in wrong_self_convention lint for to_mut
2018-10-02 14:54:36 +02:00
Josh Mcguigan
f142098474
Correct false positive in wrong_self_convention lint for to_mut
2018-10-02 04:47:38 -07:00
Manish Goregaokar
057243f16b
relicensing: Remove map_clone
...
This removes the code added in https://github.com/rust-lang-nursery/rust-clippy/pull/427
2018-10-02 12:51:38 +02:00
Manish Goregaokar
fffcd093b2
relicensing: Remove fn_to_numeric_cast, fn_to_numeric_cast_with_truncation
...
This removes the code added in https://github.com/rust-lang-nursery/rust-clippy/pull/2814
2018-10-02 12:49:27 +02:00
Manish Goregaokar
be1094bd8d
ScalarMaybeUndef -> Scalar (Rustup to e812ca472a2a5284e9f15cd9af32285d7ff3fd39)
2018-10-02 10:35:26 +02:00
Philipp Hansch
eb5f146f14
Fix 'impossible case reached' ICE
2018-10-01 22:34:52 +02:00
Matthias Krüger
91f7e22edf
remove cargo edition 2018 feature gate.
...
Rust and the cargo used to bootstrap was updated in https://github.com/rust-lang/rust/pull/54601 which now has the 2018 edition stabilized.
2018-09-30 11:12:24 +02:00
Michael Wright
50133fbd3a
Merge branch 'master' into unnecessary_filter_map
2018-09-30 06:39:56 +02:00
Josh Mcguigan
e25f884e6f
Fixes #3180 , suppress excessive_precision lint for floats with no decimal part
2018-09-29 07:39:30 -07:00
Michael Wright
c2ee9c29ab
Merge branch 'master' into unnecessary_filter_map
2018-09-29 15:27:47 +02:00
Michael Wright
06f6b36025
rustfmt
2018-09-29 14:18:50 +02:00
Michael Wright
efdc739dfc
Move unnecessary_filter_map to a submodule
2018-09-29 14:12:40 +02:00
Philipp Krones
67d85bc47d
Merge pull request #3224 from matthiaskrgr/clippy_self__use_self
...
fix some clippy::pedantic warnings found in the codebase.
2018-09-28 15:26:50 +02:00
Philipp Hansch
8e808664fa
Merge pull request #3178 from ms2300/bad_unwrap
...
Fix for bad get unwrap suggestion
2018-09-28 07:38:00 +01:00