Commit Graph

6887 Commits

Author SHA1 Message Date
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
Jeremy Stucki
419c87fb35
Refactor 'check_unwrap_or_default' 2019-08-23 14:36:00 +02:00
Jeremy Stucki
1436fea271
Refactor 'check_impl_item' 2019-08-23 14:20:55 +02:00
bors
56f51b35e8 Auto merge of #4409 - jeremystucki:export, r=phansch
[Doc] Ignore lines starting with #

Resolves #4353

changelog: none
2019-08-23 11:51:50 +00:00
bors
a175ca4e8e Auto merge of #4438 - lzutao:author-litstr-missing, r=phansch
Add missing field to LitKind::Str

changelog: none
2019-08-23 11:12:04 +00:00
Lzu Tao
5b367ed4a3 Add missing field to LitKind::Str 2019-08-23 18:02:13 +07:00
bors
7a11843853 Auto merge of #4439 - lzutao:fix-format, r=phansch
Re-factor format lint

cc #4432

changelog: none
2019-08-23 10:23:52 +00:00
Lzu Tao
ab335eacb4 Run update_lints for Unicode lint 2019-08-23 09:49:49 +00:00
Lzu Tao
f717a77ecc Re-add false positive check 2019-08-23 09:16:50 +00:00
Lzu Tao
ce2d2920ef Add raw string regression test for useless_format lint 2019-08-23 09:16:50 +00:00
Lzu Tao
09d302a786 Re-factor useless_format lint 2019-08-23 09:16:50 +00:00
Philipp Hansch
6e4aa666b3
Merge pull request #4440 from lzutao/fix-unicode
Update Unicode lint tests
2019-08-23 09:39:11 +02:00
Lzu Tao
4134e608c5 Update Unicode lint tests 2019-08-23 05:42:45 +00:00
BO41
eebb7cd839 Add examples to some complexity lints 2019-08-22 15:41:07 +02:00
BO41
3f56cb5d8b Add example to a perf lint 2019-08-22 15:41:07 +02:00
BO41
43a2ba34e6 Add examples to some correctness lints 2019-08-22 15:41:07 +02:00
Philipp Hansch
55aa9d2767
Add run-rustfix for range_plus_minus_one tests 2019-08-22 07:47:30 +02:00
Philipp Hansch
18fb1d9d2f
Add run-rustfix for or_fun_call tests 2019-08-22 07:41:00 +02:00
Philipp Hansch
9bda1e2264
Add run-rustfix for short_circuit_statement test 2019-08-22 07:21:29 +02:00
bors
6d9ee9e5eb Auto merge of #4372 - phansch:changelog_update, r=flip1995
docs: Explain how to update the changelog

cc @Manishearth Is this more or less how you did it last time?

[Rendered](https://github.com/phansch/rust-clippy/blob/changelog_update/doc/changelog_update.md#changelog-update)

changelog: none
2019-08-21 08:46:10 +00:00
bors
57c67a29d2 Auto merge of #4352 - phansch:fix_redundant_pattern_matching, r=flip1995
Fix some suggestions for redundant_pattern_matching

.. and change the Applicability to `MaybeIncorrect`.

Fixes the problem displayed in https://github.com/rust-lang/rust-clippy/issues/4344#issuecomment-519206388.

We now append `{}` to the suggestion so that the conditional has the
correct syntax again.

(If we were to _remove_ the `if` instead, it would trigger the
`unused_must_use` warning for `#[must_use]` types.)

changelog: Fix some suggestions for `redundant_pattern_matching`
2019-08-21 08:15:36 +00:00
bors
45d24fd6bf Auto merge of #4425 - mikerite:4375, r=flip1995
Fix `temporary_cstring_as_ptr` false negative

Fixes #4375.

Changes the check to test when `.unwrap().as_ptr()` is called on any
`Result<CString, _>` as suggested by @flip1995
(https://github.com/rust-lang/rust-clippy/issues/4375#issuecomment-520724123).

changelog: Fix `temporary_cstring_as_ptr` false negative
2019-08-21 07:25:58 +00:00
Philipp Hansch
436d429d27
Add two more tests, allow 2 other lints. 2019-08-21 07:43:42 +02:00
Michael Wright
59893bcab0 Fix temporary_cstring_as_ptr false negative
Fixes #4375.

Changes the check to test when `.unwrap().as_ptr()` is called on any
`Result<CString, _>` as suggested by @flip1995
(https://github.com/rust-lang/rust-clippy/issues/4375#issuecomment-520724123).
2019-08-21 07:35:04 +02:00
Philipp Hansch
84716e49f0
Add more testcases for redundant_pattern_matching
These should make sure that, when the suggestions are fixed, they are
fixed for all these cases.
2019-08-21 07:29:44 +02:00
Philipp Hansch
0d85d7e60f
Fix suggestions for redundant_pattern_matching
Fixes the problem displayed in https://github.com/rust-lang/rust-clippy/issues/4344#issuecomment-519206388.

We now append `{}` to the suggestion so that the conditional has the
correct syntax again.

(If we were to _remove_ the `if` instead, it would trigger the
`unused_must_use` warning for `#[must_use]` types.
2019-08-21 07:29:44 +02:00
Philipp Hansch
a0f9af2132
Add note on how to find the latest beta commit 2019-08-21 07:23:48 +02:00
bors
460e2659f1 Auto merge of #4423 - lzutao:await-is-stable, r=Manishearth
Remove feature gate for async_await

async/await is stablized in https://github.com/rust-lang/rust/pull/63209 🎉
changelog: none
2019-08-20 23:26:12 +00:00
Lzu Tao
2a66196013 Remove feature gate for async_await 2019-08-20 23:21:39 +00:00
bors
0ccb9ea9ac Auto merge of #4419 - lzutao:ifchain-link, r=phansch
Update if_chain doc link

changelog: none
2019-08-20 08:22:23 +00:00
bors
835205b8da Auto merge of #4401 - JJJollyjim:literal-separation-suggestion, r=flip1995
Add autofixable suggestion for unseparated integer literal suffixes

changelog: Add autofixable suggestion for unseparated integer literal suffixes

Somewhat WIP, since I haven't been able to get this working when adding `// run-rustfix` to `ui/literals.rs`. I think the issue is that there are multiple suggestions operating on one numerical literal, and I'm not sure what the best approach is to work around that.

Thanks
2019-08-20 07:54:25 +00:00
bors
cd3df6bee0 Auto merge of #4420 - phansch:disable_rls_integration_test, r=phansch
Disable RLS integration test

until RLS has been updated to the latest Clippy commit.

cc https://github.com/rust-lang/rust-clippy/pull/4416#issuecomment-522859091

changelog: none
2019-08-20 05:33:23 +00:00
Philipp Hansch
1055cf5b9f
Merge pull request #4416 from SimonSapin/plugin
Import rustc_plugin from its new location
2019-08-20 07:28:59 +02:00
Philipp Hansch
18592826da
Disable RLS integration test
until RLS has been updated to the latest Clippy commit.
2019-08-20 07:27:14 +02:00
Lzu Tao
93c77b7d01 Update if_chain doc link 2019-08-20 09:59:13 +07:00
bors
7810652310 Auto merge of #4417 - kraai:remove-in_macro_or_desugar, r=phansch
Remove in_macro_or_desugar

`in_macro_or_desugar` is just a wrapper around `Span::from_expansion`, so remove the former and call the latter instead.

changelog: Remove `in_macro_or_desugar`.
2019-08-19 19:47:50 +00:00
KRAAI, MATTHEW [VISUS]
eaf8f08390 Restore en dashes 2019-08-19 12:38:33 -07:00
KRAAI, MATTHEW [VISUS]
204b2f3658 Remove in_macro_or_desugar 2019-08-19 09:30:32 -07:00
Simon Sapin
08d8ffc6a9 Import rustc_plugin from its new location
Depends on https://github.com/rust-lang/rust/pull/62727
2019-08-19 17:52:10 +02:00
bors
918d609002 Auto merge of #4414 - chansuke:fix-contributing-doc, r=phansch
Fix the name of a channel of discord in CONTRIBUTING.md

Fixes #4400.

changelog: none

Update the naming of the Discord channel.
2019-08-19 10:29:11 +00:00
chansuke
4a70ad43e1 Fix the name of a channel of discord in CONTRIBUTING.md 2019-08-19 18:31:25 +09:00
Jamie McClymont
370433f633 Requested test cleanup 2019-08-19 20:22:42 +12:00