Commit Graph

156 Commits

Author SHA1 Message Date
Phil Ellison
29f8cea5fd Use existing match_var function 2018-01-22 05:46:32 +00:00
Phil Ellison
2132e5c58c Fix unnecessary_fold bug 2018-01-22 05:34:42 +00:00
Oliver Schneider
70302595a4
Merge branch 'master' of github.com:Manishearth/rust-clippy into fold_any 2018-01-19 12:10:24 +01:00
Phil Ellison
a324a2bc38 Fix typos 2018-01-17 21:54:09 +00:00
Phil Ellison
b73efad600 Add some reviewer comments 2018-01-17 21:06:16 +00:00
Phil Ellison
9806b31d53 Rename lint, improve documentation 2018-01-17 20:21:29 +00:00
Phil Ellison
1cac693bc7 Lint on folds implementing .all, .sum and .product 2018-01-17 19:12:44 +00:00
Phil Ellison
a64d19cc0e Fix error span to play nicely with rustfix 2018-01-16 21:20:55 +00:00
Adam Lusch
f343cd22f6 Adds the missing turbofish 2018-01-14 20:19:55 -08:00
Adam Lusch
1615813960 Moves clone_on_ref_ptr to be a restriction lint
Also updates the suggestion to include the full type (e.g. `Arc<Foo>::clone(&rc)`)
and adds a case using trait objects to the UI tests.
2018-01-14 19:58:09 -08:00
Phil Ellison
ad164939ed Check that we're calling Iterator::fold 2018-01-14 20:04:34 +00:00
Phil Ellison
70a5535ffa Address some review comments 2018-01-14 18:18:09 +00:00
Phil Ellison
360f2359d5 Fix name 2018-01-14 15:30:06 +00:00
Phil Ellison
7e833ea5ce Add description 2018-01-14 10:07:41 +00:00
Phil Ellison
528be23c07 Move get_arg_name into utils 2018-01-14 10:05:01 +00:00
Phil Ellison
1feb9fd550 Tidy using if_chain and snippet function. Actually check that the initial fold value is false. Remove some unwraps 2018-01-14 09:30:08 +00:00
Phil Ellison
f6e56d2559 First pass at linting for .any expressed as a .fold 2018-01-14 08:27:53 +00:00
Manish Goregaokar
7e099903be Update to handle GenericParam
introduced in https://github.com/rust-lang/rust/pull/45930
2017-12-21 20:54:49 -08:00
Oliver Schneider
7d7fef1690
Fix #1925 2017-11-30 10:55:06 +01:00
Oliver Schneider
299f1270a6
Rustup 2017-11-10 08:58:54 +01:00
topecongiro
a6c71e9c0d Fix lines that exceed max width manually 2017-11-05 04:59:21 +09:00
topecongiro
7a06d312fd Cargo fmt 2017-11-05 04:55:56 +09:00
cgm616
76e765aeda Switch to new method of checking access 2017-11-02 23:53:48 -05:00
cgm616
ee289c9f88 Merge branch 'master' of github.com:rust-lang-nursery/rust-clippy 2017-11-02 22:57:07 -05:00
G. Endignoux
f0a1eff1c4 Start working on #1590 2017-10-30 13:08:09 +01:00
cgm616
85683bf07c Fix mistake in merging 2017-10-28 13:23:05 -05:00
Manish Goregaokar
b0616df931 Merge branch 'pr-2140' 2017-10-28 14:04:25 -04:00
cgm616
d094f98f0b Merge branch 'master' of github.com:rust-lang-nursery/rust-clippy 2017-10-28 12:55:16 -05:00
Alex Burka
41840ae3c4 mechanically swap if_let_chain -> if_chain 2017-10-23 15:18:02 -04:00
cgm616
0b0eb8ead6 Undo rustfmt changes unrelated to issue 2017-10-22 09:59:19 -04:00
cgm616
60c7bd47a5 Prevent should_implement_trait on private method
This should close #2159.
2017-10-21 07:53:57 -04:00
HMPerson1
ff4a850353 Add lint for useless as_ref calls 2017-10-20 20:33:19 -04:00
Paul Florence
406931381b Fixed some code in clippy to pass the new, removed formatting changes. 2017-10-20 10:17:41 -04:00
Oliver Schneider
35b2669219
Check the map for promotable instead for existance of a node (which is always the case) 2017-10-20 09:02:32 +02:00
Manish Goregaokar
3e108b7190 Fix constant promotion stuff 2017-10-19 10:16:03 -07:00
Sunjay Varma
da14435ed2 Updated clippy to account for changes from rust-lang/rust#44766 2017-10-15 15:39:47 -04:00
Lukas Stevens
4438c41d14 Make suggested changes
- Fix copy-paste error
- Check for opt.map_or argument after ensuring that opt is an Option
- Use span_lint_and_then and span_suggestion
- Update reference
2017-10-10 15:35:24 +02:00
Lukas Stevens
c0fac7cf56 Remove unnecessary borrow 2017-10-10 14:04:41 +02:00
Lukas Stevens
eb53cca768 Add lint for opt.map_or(None, f)
Change to Warn and add multiline support

Fix typo

Update reference
2017-10-10 13:37:45 +02:00
Seiichi Uchida
63d6df2101 Add a comment that explains about comparing snippet to raw text 2017-10-07 00:12:30 +09:00
Seiichi Uchida
f5c941a404 Update OPTION_MAP_UNWRAP_OR lint
Add a suggestion to replace `map(f).unwrap_or(None)` with `and_then(f)`.
2017-10-06 22:06:47 +09:00
Manish Goregaokar
fabb6b6645
Rustup to rustc 1.22.0-nightly (6c476ce46 2017-09-25) 2017-09-25 19:52:29 -07:00
topecongiro
81f5c69131 Enhance CHARS_*_CMP lint 2017-09-16 14:50:07 +09:00
Oliver Schneider
32a9394490
Rustup 2017-09-13 15:34:04 +02:00
Aaron Hill
d318ced660
Add CLONE_ON_REF_PTR lint
Closes issue #1645
2017-09-09 21:52:19 -04:00
Aaron Hill
8adc42b5b4
Update for latest Rust
This is mainly due to https://github.com/rust-lang/rust/commit/dead08cb33134
2017-09-09 01:23:08 -04:00
Oliver Schneider
e4524ac4de
Run nightly rustfmt 2017-09-05 12:39:27 +02:00
Manish Goregaokar
2544458559
Run rustfmt 2017-09-03 14:15:18 -07:00
Oliver Schneider
a8cf4e8ecb
Accessing Span internals is deprecated 2017-08-31 14:47:45 +02:00
Martin Carton
5cf3f8359f Merge pull request #1989 from Frederick888/fix-1988
Try to fix #1988
2017-08-25 12:39:53 +02:00