flip1995
dabf599c90
Ignore no_std-test on windows and macos
2019-08-05 17:53:55 +02:00
flip1995
a922f800af
Run update_lints and fmt
2019-08-05 13:24:31 +02:00
Vincent Dal Maso
77b21b644f
Move expression check to LateLintPass
...
Changes:
- Move from EarlyLintPass
- Fix entrypoint check with function path def_id.
2019-08-05 13:23:30 +02:00
Vincent Dal Maso
4eab691db6
Add recursion check on main function
...
Changes:
- Add MainRecursion lint to clippy
- Check for no-std setup
fixes #333
2019-08-05 13:23:30 +02:00
bors
ca6a9beb31
Auto merge of #4338 - flip1995:rollup-9cm4jbr, r=flip1995
...
Rollup of 4 pull requests
Successful merges:
- #4329 (Doctests: Enable running doc tests for pedantic lints)
- #4330 (Doctests: Enable running doc tests for nursery lints)
- #4331 (Doctests: Enable running doc tests for restriction lints)
- #4332 (Split up cast.rs tests, run-rustfix for unnecessary_cast)
Failed merges:
r? @ghost
changelog: none
2019-08-05 09:44:45 +00:00
Philipp Krones
9259eeb689
Rollup merge of #4332 - phansch:rustfix_unnecessary_cast, r=flip1995
...
Split up cast.rs tests, run-rustfix for unnecessary_cast
This splits up the cast.rs tests and enables rustfix tests for the part
of the `unnecessary_cast` lint that emits `MachineApplicable`
suggestions.
changelog: none
cc #3630
2019-08-05 10:50:07 +02:00
Philipp Krones
93c3da223f
Rollup merge of #4331 - phansch:doctests_restriction, r=flip1995
...
Doctests: Enable running doc tests for restriction lints
changelog: Enabled remaining doc tests for lint documentation page
master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 231 passed; 0 failed; 123 ignored; 0 measured; 0 filtered out
Closes #4319 (assuming this is merged after #4329 and #4330 )
2019-08-05 10:50:06 +02:00
Philipp Krones
f5db24a59f
Rollup merge of #4330 - phansch:doctests_nursery, r=flip1995
...
Doctests: Enable running doc tests for nursery lints
changelog: none
master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 213 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
cc #4319
2019-08-05 10:50:04 +02:00
Philipp Krones
713ad964af
Rollup merge of #4329 - phansch:doctests_pedantic, r=flip1995
...
Doctests: Enable running doc tests for pedantic lints
changelog: none
master: 202 passed; 0 failed; 122 ignored; 0 measured; 0 filtered out
this PR: 254 passed; 0 failed; 131 ignored; 0 measured; 0 filtered out
cc #4319
2019-08-05 10:50:03 +02:00
bors
a90b3ba301
Auto merge of #4337 - flip1995:let_unit, r=phansch
...
Make let_unit lint suggestion auto applicable
changelog: Make `let_unit` lint suggestion auto applicable
2019-08-05 08:41:24 +00:00
bors
20021bb4c7
Auto merge of #4333 - phansch:rustfix_decimal_literal_representation, r=flip1995
...
Add run-rustfix for decimal_literal_representation lint
changelog: none
cc #3630
2019-08-05 08:00:39 +00:00
flip1995
385f4474da
Add tests for auto fixable let_unit suggestion
2019-08-05 09:31:08 +02:00
flip1995
c5ad0b075a
Make let_unit lint suggestion auto applicable
2019-08-05 09:31:08 +02:00
bors
495a571f09
Auto merge of #4336 - phansch:rustup, r=flip1995
...
Rustup to https://github.com/rust-lang/rust/pull/63213
changelog: none
2019-08-05 07:23:07 +00:00
Philipp Hansch
71a943820b
Rustup to https://github.com/rust-lang/rust/pull/63213
2019-08-05 07:30:01 +02:00
Philipp Hansch
a332febb04
Add run-rustfix for decimal_literal_representation lint
...
cc #3630
2019-08-04 10:21:52 +02:00
Philipp Hansch
2d84d0361d
Split up cast.rs tests, run-rustfix for unnecessary_cast
...
This splits up the cast.rs tests and enables rustfix tests for the part
of the `unnecessary_cast` lint that emits `MachineApplicable`
suggestions.
cc #3630
2019-08-04 08:24:23 +02:00
Philipp Hansch
b608e02e1c
Doctests: Enable running doc tests for restriction lints
2019-08-03 21:24:50 +02:00
Philipp Hansch
2f48effc92
Doctests: Enable running doc tests for nursery lints
2019-08-03 21:01:23 +02:00
Philipp Hansch
1dc9a5012e
Doctests: Enable running doc tests for pedantic lints
2019-08-03 20:36:38 +02:00
bors
5c1e30ab05
Auto merge of #4327 - phansch:doctests_perf, r=flip1995
...
Doctests: Enable running doc tests for perf lints
changelog: none
This should be possible to merge independently of #4325
cc #4319
2019-08-03 14:06:13 +00:00
bors
3dc91838e4
Auto merge of #4325 - phansch:doctests_complexity, r=flip1995
...
Doctests: Enable running doc tests for complexity lints
changelog: none
master: `113 passed; 0 failed; 91 ignored; 0 measured; 0 filtered out`
this PR: `181 passed; 0 failed; 110 ignored; 0 measured; 0 filtered out`
cc #4319
2019-08-03 13:24:07 +00:00
bors
a24c7046f2
Auto merge of #4328 - phansch:rustup, r=phansch
...
Rustup to latest rustc master
Broken due to:
* https://github.com/rust-lang/rust/pull/63180 (`Existential` -> `OpaqueTy`)
* https://github.com/rust-lang/rust/pull/63121 (New fields for `FormatSpec`)
changelog: none
2019-08-03 11:39:51 +00:00
Philipp Hansch
ff59f4ad21
Ignore missing rustfmt
2019-08-03 12:30:51 +02:00
Philipp Hansch
d61df4f609
Rustup to latest rustc master
...
Broken due to:
* https://github.com/rust-lang/rust/pull/63180 (`Existential` -> `OpaqueTy`)
* https://github.com/rust-lang/rust/pull/63121 (New fields for `FormatSpec`)
2019-08-03 08:44:32 +02:00
Philipp Hansch
eb68dc9a1a
Also enable doc tests for internal lints
...
Because there were fixed in the parent commit.
2019-08-03 08:12:53 +02:00
Philipp Hansch
c0cdfd296e
Doctests: Enable running doc tests for perf lints
...
This should be possible to merge independently of #4325
cc #4319
2019-08-03 08:08:00 +02:00
Philipp Hansch
abfa8a952c
Doctests: Fix all complexity lint docs
...
cc #4319
2019-08-02 18:16:35 +02:00
bors
d43ef7aa3f
Auto merge of #4322 - Y0hy0h:patch-1, r=phansch
...
Improve documentation on implicit_hasher lint
Provide an example of how to fix the implicit_hasher lint.
Fixes #3475 .
changelog: none
2019-08-01 18:58:11 +00:00
Y0hy0h
5decadd93e
Fix missing import
2019-08-01 17:54:22 +02:00
bors
18a7dce4da
Auto merge of #4314 - chansuke:add-negation-to-is_empty, r=flip1995
...
Add negation to `len_zero` lint to show more explicit message.
Fixes #4304 I have updated the `len_zero` to show the required negation in case of like the below case.
```
fn main() {
let v = vec![1];
if v.len() > 0 {
}
}
```
changelog: Clarify suggestion of `len_zero` lint.
2019-08-01 14:09:59 +00:00
chansuke
ccc3257c91
Update stderr
file
2019-08-01 22:20:08 +09:00
bors
6e6ee873dc
Auto merge of #4307 - flip1995:unnecessary_unwrap, r=oli-obk
...
Move {unnecessary,panicking}_unwrap out of nursery
Resolves #2437
changelog: Move `{unnnecessary,panicking}_unwrap` out of nursery
2019-08-01 13:18:04 +00:00
flip1995
feca48d8a2
Fix doc tests
2019-08-01 15:14:06 +02:00
flip1995
7a73b8fdfa
Remove Known problems for UNNECESSARY_UNWRAP
...
This shouldn't happen with NLL
2019-08-01 15:14:06 +02:00
flip1995
e6a836e2e8
Move UNNECESSARY_UNWRAP to complexity and PANICKING_UNWRAP to correctness
2019-08-01 15:14:06 +02:00
bors
c8e5352d9b
Auto merge of #4318 - izik1:typo, r=phansch
...
Fix `for on` typo
<!--
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 `cargo fmt`
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 -->
closes #4317
changelog: minor typo fix
2019-08-01 09:20:32 +00:00
Y0hy0h
d7224a6341
Improve documentation on implicit_hasher lint
...
Provide an example of how to fix the lint.
2019-08-01 10:51:39 +02:00
bors
3087e91bed
Auto merge of #4316 - phansch:method_rs_cleanup2, r=flip1995
...
UI Test Cleanup: No wrong_self_convention in methods.rs
These cases are already covered in `tests/ui/wrong_self_convention.rs`.
cc #2038
changelog: none
2019-08-01 08:40:15 +00:00
bors
5d061d7058
Auto merge of #4315 - phansch:fn_to_numeric_cast_applicability, r=flip1995
...
Mark `fn_to_numeric_cast` lints as MaybeIncorrect
At least for now so that `cargo fix --clippy` is not causing problems
with this lint. See #3896 for the remaining problems with the suggestions of this lint.
changelog: none
cc #3630 , #3896
2019-08-01 07:59:51 +00:00
bors
01f2b53039
Auto merge of #4303 - mikerite:dev-fmt-20190728, r=flip1995
...
Make fmt test and command more robust
changelog: none
2019-08-01 07:24:32 +00:00
Zachery Gyurkovitz
b8a50cae4c
Fix for on
typo
2019-07-31 22:24:57 -07:00
Michael Wright
be646ac0df
Update formatting
2019-08-01 07:09:57 +02:00
Michael Wright
fd9c5a3c71
Merge branch 'master' into dev-fmt-20190728
2019-08-01 07:02:48 +02:00
Philipp Hansch
533abfa613
UI Test Cleanup: No wrong_self_convention in methods.rs
...
These cases are already covered in `tests/ui/wrong_self_convention.rs`.
cc #2038
2019-08-01 06:54:57 +02:00
Philipp Hansch
04ca58a691
Mark fn_to_numeric_cast
lints as MaybeIncorrect
...
At least for now so that `cargo fix --clippy` is not causing problems
with this lint.
cc #3630 , #3896
2019-07-31 21:05:31 +02:00
bors
d1b4fc9853
Auto merge of #4313 - Manishearth:owl, r=yaahallo
...
Don't nudge people towards toilet closures when producing owl results
`.map_err(drop)` should never be linted since sometimes you want to produce `Result<(), ()>` and the alternative is `.map_err(|_| ())`, which can be ugly. We don't seem to, but it's good to specifically test for this.
changelog: none
r? @yaahallo
2019-07-31 17:57:57 +00:00
Manish Goregaokar
38e7bd20f2
Don't nudge people towards toilet closures when producing owl results
2019-07-31 09:10:34 -07:00
chansuke
2d467dca62
Add required negation in non_zero lint
2019-08-01 00:23:09 +09:00
bors
128647d821
Auto merge of #4308 - jakubadamw:use-self-variant-scope, r=flip1995
...
Extend the `use_self` lint to suggest uses of `Self::Variant`
Fixes #4296 .
changelog: Extend the `use_self` lint to suggest uses of `Self::Variant`
2019-07-31 14:50:01 +00:00