Commit Graph

4607 Commits

Author SHA1 Message Date
Devon Hollowood dcef9d0795 Fix stutter lints 2018-10-11 15:42:22 -07:00
Devon Hollowood 9afd8abbe3 Fix similar_names warnings
Most of these are just `#![allow]`ed, because they are things like using
l vs r to differentiate left vs right. These would be made less clear by
taking the advice of `similar_names`
2018-10-11 15:18:58 -07:00
Oliver Scherer 9d3373137b Remove now-useless allow(unknown_lints) 2018-10-11 12:18:27 +02:00
Oliver Scherer b8654eaa6c Stabilize tool lints 2018-10-11 12:16:22 +02:00
Philipp Hansch 8b45dd704b Merge pull request #3294 from mikerite/fix-3276
Fix fn_to_numeric_cast_with_truncation suppression
2018-10-11 10:53:05 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer 5e38944ebe Merge pull request #3295 from phansch/refactor_clippy_dev
Use `impl Iterator` in arg position in clippy_dev
2018-10-11 09:20:20 +02:00
Philipp Hansch 759ceb9840 Use impl Iterator in arg position in clippy_dev
Small refactoring pulled out of work on #3266.
This should make the methods a bit more flexible.
2018-10-11 08:34:51 +02:00
Philipp Hansch 928a6d3dc7 Merge pull request #3288 from devonhollowood/pedantic-dogfood-casts
Pedantic dogfood: casts
2018-10-11 08:07:51 +02:00
Michael Wright 80cf0d7f26 Fix fn_to_numeric_cast_with_truncation suppression
Fixes #3276
2018-10-11 07:45:26 +02:00
mikerite 31eb3b73d3 Merge pull request #3127 from mikerite/fix-2937
Fix 2937
2018-10-11 06:22:02 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer dd11ffac0b Merge pull request #3292 from kimsnj/commutative_assign_op
Limit commutative assign op lint to primitive types
2018-10-10 22:35:02 +02:00
Karim SENHAJI f9e4f5695d Limit commutative assign op lint to primitive types 2018-10-10 19:10:44 +02:00
Devon Hollowood 289c642d1a Clarify code
Take advantage of the fact that very large regexes are unlikely
2018-10-09 23:35:10 -07:00
Michael Wright 7499cb543d Fix #2937 2018-10-10 07:52:58 +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
Devon Hollowood 2b9abc5daa Fix cast_possible_wrap and cast_sign_loss warnings 2018-10-08 22:34:10 -07:00
Devon Hollowood eef2e8948b Fix cast_possible_truncation warnings 2018-10-08 21:40:21 -07:00
Josh Mcguigan ad5c29a445 Fixes #2925 cmp_owned false positive 2018-10-08 19:04:29 -07:00
Philipp Hansch 995a974182 Merge pull request #3278 from d-dorazio/fix-contributing-manual-test-command
contributing.md: fix command to manually test an example
2018-10-08 21:54:08 +02:00
Philipp Hansch d47dbf598a Merge pull request #3234 from matthiaskrgr/fix_3064_crash
if_let_redundant_pattern_matching: use Span.to() instead of Span.with_hi() to fix crash.
2018-10-08 21:31:04 +02: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
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer d67286b70b Merge pull request #3286 from vmalloc/lifetime_elision_msg
Improve diagnostics in case of lifetime elision (closes #3284)
2018-10-08 13:52:19 +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
Philipp Hansch a16edf84ce Merge pull request #3265 from mikerite/fix-export
Fix util/export.py to include lints from methods
2018-10-08 07:22:09 +01: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 consts 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]: https://github.com/rust-lang/rust/blob/5472b0718f286266ab89acdf234c3552de7e973c/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
Daniele D'Orazio e1d7f00e43 fix command to manually test an example 2018-10-07 11:56:13 +02:00
Philipp Hansch 4511f4edf4 Merge pull request #3273 from maccoda/master
Adding more detail to filter_map lint documentation.
2018-10-07 10:02:46 +01:00
Manish Goregaokar 492d6852e5 Add license to README 2018-10-06 19:29:01 -07:00
Dylan Maccora d129d049c6 Adding more detail to filter_map lint documentation. 2018-10-07 11:24:09 +11:00
Manish Goregaokar 1e0729d48a Merge pull request #3269 from rust-lang-nursery/relicense
Relicense clippy to the Rust license
2018-10-06 10:21:57 -07:00
Manish Goregaokar 31bc2827f8 additional people 2018-10-06 10:20:48 -07:00
Manish Goregaokar 23e5e24f52 Add license header to other files 2018-10-06 09:43:08 -07:00
Manish Goregaokar e9c025ea70 Add license header to Rust files 2018-10-06 09:43:08 -07:00
Manish Goregaokar ca437e81a7 Relicense clippy
Documentation on relicensing in previous commit

Fixes #2885

Also fixes #3093, fixes #3094, fixes 3095, fixes #3096, fixes #3097, fixes #3098,
fixes #3099, fixes #3100, fixes #3230
2018-10-06 09:43:08 -07:00
Manish Goregaokar 8db2092923 Document relicensing process 2018-10-06 09:43:08 -07:00
Manish Goregaokar 32b1d1fc15 Merge pull request #3270 from rust-lang-nursery/rustup
Rustup for https://github.com/rust-lang/rust/pull/54741
2018-10-05 22:35:04 -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