Oliver Schneider
f7b2578aea
Update to rustc master
2018-03-13 11:38:21 +01:00
Bruce Mitchener
769a1d9b6c
Fix single_char_pattern for \n, \t, etc.
...
Single characters that are escaped weren't being searched / replaced
correctly in the hint string, so it was saying to replace, say,
`"\n"` with `"\n"` rather than `'\n'`.
2018-03-02 22:00:01 +07:00
bootandy
aef07e3392
Do not pass Span by reference
2018-02-22 10:11:20 -05:00
bootandy
a7c97256dc
Stop unwanted newlines being applied on unwrap_or
2018-02-21 11:29:08 -05:00
bootandy
c708154c16
Simplify creation of span_replace_word
...
Part of unwrap_or test
2018-02-20 12:38:20 -05:00
bootandy
941e062fd4
Fix: point to correct problem part of code
...
Fix span so it no longer contains the whole train-wreck of code and only
points to the problem function (for the unwrap_or lint).
https://github.com/rust-lang-nursery/rust-clippy/issues/2422
Update ui test methods - it had several cases where the error message
span is now shorter
2018-02-19 12:14:53 -05:00
Seiichi Uchida
e40bc64f4f
Rustup to rustc 1.25.0-nightly (7d6e5b9da 2018-01-27)
2018-01-28 16:28:48 +09:00
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