BO41
945d4cf69f
Dereference one less on search_is_some and make it auto-fixable
2019-08-29 17:34:02 +02:00
bors
888b736560
Auto merge of #4408 - phansch:more_rustfix_tests, r=flip1995
...
More rustfix tests
<!--
Thank you for making Clippy better!
We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
`changelog` entry as `none`. Otherwise, please write a short comment
explaining your change.
If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.
If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [ ] Executed `./util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `./util/dev fmt`
[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.
Delete this line and everything above before opening your PR -->
cc #3630
This is probably easier reviewed per-commit.
changelog: none
2019-08-29 10:48:14 +00:00
bors
83f2eb7a05
Auto merge of #4469 - vityafx:master, r=flip1995
...
Improve the cognitive_complexity lint's warning.
Adds the value of complexity limit set for the lint
to the warning.
Fixes #4466
Signed-off-by: Victor Polevoy <fx@thefx.co>
changelog: improve the `cognitive_complexity` lint's warning message.
2019-08-29 10:19:26 +00:00
Victor Polevoy
87ef86ef5a
Improve cognitive_complexity lint's warning.
...
Adds the value of complexity limit set for the lint
to the warning.
Fixes #4466
Signed-off-by: Victor Polevoy <fx@thefx.co>
2019-08-29 11:54:18 +02:00
Michael Wright
0c8332558b
Merge branch 'master' into fix-4437
2019-08-29 08:17:36 +02:00
Philipp Hansch
1b18597554
Fix missing_const_for_fn false positive
...
We don't want to lint if any of the input parameters implement drop.
(constant functions cannot evaluate destructors)
2019-08-29 08:07:41 +02:00
Philipp Hansch
eeeadf30bf
Make useless_attribute suggestion MaybeIncorrect
2019-08-28 21:17:12 +02:00
bors
4c8a941daf
Auto merge of #4465 - JohnTitor:add-note-to-fix-toolstate, r=flip1995
...
Add note to fix toolstate
The idea from https://github.com/rust-lang/rust-clippy/pull/4462#issuecomment-525725587
It's nice that we have the documentation to guide fix toolstate.
changelog: none
2019-08-28 16:09:08 +00:00
Yuki Okushi
2c58936a27
Add note to fix toolstate
2019-08-29 01:07:46 +09:00
bors
9936d36523
Auto merge of #4464 - flip1995:fetch_prs_between, r=phansch
...
Also fetch rollup merges in fetch_prs_between.sh script
Otherwise rolled up PRs won't be included in the changelog, e.g. 236666138f
changelog: none
2019-08-28 12:37:29 +00:00
flip1995
2dc7727bcd
Also fetch rollup merges in fetch_prs_between.sh script
2019-08-28 13:53:56 +02:00
bors
a939d61cf7
Auto merge of #4463 - flip1995:rollup-240kr2c, r=flip1995
...
Rollup of 2 pull requests
Successful merges:
- #4459 (Add note to avoid confusing)
- #4460 (Fix `inherent_to_string` false positive)
Failed merges:
r? @ghost
changelog: none
2019-08-28 11:11:43 +00:00
Philipp Krones
236666138f
Rollup merge of #4460 - JohnTitor:fix-inherent-to-string, r=flip1995
...
Fix `inherent_to_string` false positive
Fixes #4457
changelog: fixes `inherent_to_string` false positive
2019-08-28 13:00:52 +02:00
Philipp Krones
ad43d68ea2
Rollup merge of #4459 - JohnTitor:update-testing-notes, r=flip1995
...
Add note to avoid confusing
Fixes #4456
changelog: none
2019-08-28 13:00:51 +02:00
bors
f6c752b271
Auto merge of #4462 - JohnTitor:fix-build-arg, r=flip1995
...
Replace `Arg` with `Param`
Fix build issue.
Rustup to https://github.com/rust-lang/rust/pull/63127
changelog: none
2019-08-28 10:28:30 +00:00
Yuki Okushi
2c282252a9
Replace Arg
with Param
2019-08-28 18:33:25 +09:00
Philipp Hansch
f41677902d
Update int_plus_one suggestion text
...
This is now in line with the recommendations from here:
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/struct.Diagnostic.html#method.span_suggestion
2019-08-28 07:29:30 +02:00
Philipp Hansch
31cf2f2f35
Change float_cmp Applicability to HasPlaceholders
...
The suggestion includes an 'errors' placeholder currently, so it's not
`MachineApplicable`
2019-08-28 07:23:23 +02:00
Philipp Hansch
8a161d71f8
Add run-rustfix for rename test
...
I removed the `Bar` static and `Foo` impl because they are not needed
for what's tested here as far as I can tell.
2019-08-28 07:23:23 +02:00
Philipp Hansch
dea92fada5
Add run-rustfix for outer_expn_data
2019-08-28 07:23:23 +02:00
Philipp Hansch
a3418933c6
Add run-rustfix for useless_attribute test
2019-08-28 07:23:23 +02:00
Philipp Hansch
b6e87c6ae3
Add run-rustfix for int_plus_one test
2019-08-28 07:23:23 +02:00
Philipp Hansch
cb341c8090
Add run-rustfix for assign_ops test
2019-08-28 07:23:23 +02:00
Yuki Okushi
1dca950ac4
Fix inherent_to_string
false positive
2019-08-28 06:46:26 +09:00
Yuki Okushi
b348aae767
Add note to avoid confusing
2019-08-28 03:17:05 +09:00
flip1995
e7d8cf8511
Add test for external macro
2019-08-27 09:43:19 +02:00
flip1995
d36c785344
Allow block_in_if_{stmt,expr} in external macro
2019-08-27 09:43:03 +02:00
bors
949b347f65
Auto merge of #4444 - phansch:split_up_cmp_owned2, r=flip1995
...
Split up cmp_owned tests, add run-rustfix
Some of the cmp_owned tests emitted non-machine-applicable suggestions,
so I moved them to `tests/ui/cmp_owned/without_suggestion.rs` and added
`// run-rustfix` to the other half.
changelog: none
cc #3630
2019-08-26 14:32:12 +00:00
bors
fea888f2ec
Auto merge of #4445 - phansch:fix_unused_unit_sugg, r=flip1995
...
Fix unused_unit false positive
changelog: Fix `unused_unit` false positive
For some reason the `expr` of `stmt.node` didn't contain the expansion information, but the `stmt.span` does.
Fixes #4076
2019-08-26 13:29:01 +00:00
Philipp Hansch
6d425a60a7
Use correct path in comment
...
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-08-26 15:28:35 +02:00
bors
f760088820
Auto merge of #4430 - lzutao:defid_trait_alias, r=flip1995
...
Account for trait alias when looking for defid
I hit the crash on the `expect` call when running clippy on rustc libcore.
Hopefully this will fix it.
changelog: none
2019-08-26 12:46:00 +00:00
Lzu Tao
c222e7eca7
Add regression test for looking for trait defid in nocore
2019-08-26 14:45:28 +02:00
bors
ba6681300e
Auto merge of #4436 - BO41:written_as, r=phansch
...
Add some "could be written as" examples
fixes #4405
changelog: none
2019-08-26 11:11:57 +00:00
bors
b8e5e6f3c2
Auto merge of #4421 - lzutao:unsep_literal, r=flip1995
...
Cleaner code for unsep literals
Continuing discussion in https://github.com/rust-lang/rust-clippy/pull/4401#issuecomment-522498754
changelog: none
r? @flip1995
2019-08-26 10:32:24 +00:00
bors
7f15607e9a
Auto merge of #4451 - hvenev:non-exec, r=flip1995
...
Mark rust source file as non-executable.
It would be nice if you can backport this to beta as well.
changelog: none
2019-08-26 09:53:34 +00:00
bors
d089032331
Auto merge of #4431 - phansch:more_rustfix, r=flip1995
...
Add 3 more run-rustfix headers
changelog: none
cc #3630
2019-08-26 09:15:20 +00:00
Lzu Tao
c1a4b26406
Cleaner code for unsep literals
2019-08-26 16:11:43 +07:00
flip1995
0fc8eaf294
Remove empty *.std{err,out} files
2019-08-26 10:22:34 +02:00
Hristo Venev
2a009b0ebf
Mark rust source file as non-executable.
2019-08-25 17:49:45 +00:00
Lzu Tao
dac2509bac
Account for trait alias when looking for defid
2019-08-25 20:36:11 +07:00
bors
05f603e6ce
Auto merge of #4447 - phansch:fix_build, r=matthiaskrgr
...
Rustup to https://github.com/rust-lang/rust/pull/63854
changelog: none
2019-08-25 06:25:35 +00:00
Philipp Hansch
818b2ccfc5
Rustup to https://github.com/rust-lang/rust/pull/63854
2019-08-25 08:06:32 +02:00
Michael Wright
23336adf84
Fix match_as_ref
bad suggestion
...
Fixes #4437
2019-08-25 07:10:45 +02:00
Philipp Hansch
957dedb11d
Fix unused_unit false positive
...
Fixes #4076
2019-08-24 22:09:02 +02:00
BO41
31a6ab47e1
Fix lint doc
2019-08-24 13:57:25 +02:00
Philipp Hansch
9a0b598b73
Split up cmp_owned tests, add run-rustfix
...
Some of the cmp_owned tests emitted non-machine-applicable suggestions,
so I moved them to `tests/ui/cmp_owned/without_suggestion.rs` and added
`// run-rustfix` to the other half.
cc #3630
2019-08-24 10:38:45 +02:00
bors
2bcb615594
Auto merge of #4443 - jeremystucki:methods-refactoring, r=phansch
...
Small refactoring of methods/mod.rs
changelog: none
2019-08-24 07:45:29 +00:00
Jeremy Stucki
2da8288433
Refactor some minor things
2019-08-23 22:52:04 +02:00
Jeremy Stucki
907aebcf8b
Use more if-chains
2019-08-23 22:51:44 +02:00
Jeremy Stucki
4130dfba2e
Refactor 'lint_or_fun_call'
2019-08-23 22:31:22 +02:00