Commit Graph

1869 Commits

Author SHA1 Message Date
Matthias Krüger
c492818110 mem_forget: fix syntax error in code sample 2018-10-14 10:30:04 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
601cc9d2c5
Merge pull request #3310 from JoshMcguigan/explicit_counter_loop-3308
explicit_counter_loop fix #3308 false positive
2018-10-13 20:11:50 +02:00
Josh Mcguigan
c6f79c7ba0 explicit_counter_loop fix #3308 false positive 2018-10-13 06:57:52 -07:00
Josh Mcguigan
54506705ce Added new_ret_no_self exception to clippy to pass dogfood tests 2018-10-13 06:25:10 -07:00
Josh Mcguigan
a5e4805ecf new_ret_no_self correctly lint impl return 2018-10-13 06:20:39 -07:00
Josh Mcguigan
2ef4af7db2 Removed unused variables 2018-10-13 06:20:39 -07:00
Josh Mcguigan
1c4fa419f3 new_ret_no_self fix false positive for impl trait return with associated type self 2018-10-13 06:20:39 -07:00
Josh Mcguigan
13ce96c4bf new_ret_no_self corrected panic and added test stderr 2018-10-13 06:20:39 -07:00
Josh Mcguigan
eb854b233c new_ret_no_self added positive test cases 2018-10-13 06:20:39 -07:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
8b12eee112
Merge pull request #3233 from rust-lang-nursery/unused-unit
new lint: unused_unit
2018-10-13 09:30:19 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
78860a71d8
Merge pull request #3298 from devonhollowood/pedantic-dogfood-naming
Pedantic dogfood: naming and docs
2018-10-13 09:24:55 +02:00
Devon Hollowood
335bc1e820 Fix some more stutter warnings 2018-10-12 17:07:48 -07:00
Andre Bogus
e8687a6677 unused unit lint 2018-10-13 00:42:55 +02:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
d445dbfe16
Merge pull request #3291 from JoshMcguigan/cmp_owned-3289
cmp_owned wording and false positive
2018-10-12 15:07:12 +02:00
Josh Mcguigan
352863065c cmp_owned refactor 2018-10-12 04:48:54 -07:00
Josh Mcguigan
c9718fa589 cmp_owned correct error message if rhs is deref 2018-10-12 04:34:41 -07:00
sigustin
4e20625187
Add a comment reminding to update README if the default changes 2018-10-12 12:32:48 +02:00
Devon Hollowood
73ba33dd2b Fix doc_markdown lints 2018-10-11 15:43:13 -07:00
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
Josh Mcguigan
0b65462ca5 cmp_owned current suggestion for multiple deref 2018-10-11 05:03:02 -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
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
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
Josh Mcguigan
88ee209a1d Corrected single-character string constant used as pattern found in dogfood test 2018-10-09 20:01:12 -07:00
Josh Mcguigan
b0d7aea946 Fixes 3289, cmp_owned wording and false positive 2018-10-09 19:25:03 -07: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
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 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]: 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