Commit Graph

6827 Commits

Author SHA1 Message Date
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
bors
5c71c1b838 Auto merge of #4411 - mikerite:fix-4384, r=flip1995
Fix `clone_on_copy` false positives

Closes #4384

changelog: Fix `clone_on_copy` false positives
2019-08-19 08:04:12 +00:00
bors
d1f1844f46 Auto merge of #4386 - lzutao:lint-option-and_then-some, r=flip1995
Add option_and_then_some lint

changelog: Add complexity lint to warn about `option.and_then(|o| Some(x))` and suggest replacing with `option.map(|o| x)`.

Closes #4299
2019-08-19 07:35:53 +00:00
bors
2ed80d4d81 Auto merge of #4410 - matthiaskrgr:url_serde_feat, r=phansch
deps: try to fix build in rustc repo: enable serde feature url dep in clippy-lints crate

This might fix the problem in https://github.com/rust-lang/rust/pull/63587
I didn't have time to test this yet.
r? @flip1995
changelog: enable serde feature of url dep in clippy-lints to depened on it in the same way cargo does
2019-08-19 06:20:01 +00:00
Michael Wright
68a1af540c Fix clone_on_copy false positives
Closes #4384
2019-08-19 08:19:54 +02:00
Lzu Tao
41eba2f26a Add test 2019-08-19 05:41:47 +00:00
Matthias Krüger
88f417e446 try to fix build in rustc repo 2019-08-19 06:10:00 +02:00
Lzu Tao
50ecd595a6 Allow option_and_then_some in option_map_or_none test 2019-08-19 03:54:40 +00:00
Lzu Tao
7065239da5 Add option_and_then_some lint 2019-08-19 03:54:40 +00:00
Jamie McClymont
4ee9d02efa Requested changes 2019-08-19 14:20:38 +12:00
bors
f01a0c0e08 Auto merge of #4403 - xd009642:type_repetition_improvements, r=phansch,flip1995
Improvements to `type_repetition_in_bounds`

Improvements to the `type_repetition_in_bounds` trait based on feedback from #4380 #4326 #4323

Currently just make it pedantic. Hopefully, more to come

changelog: move `type_repetition_in_bounds` to `pedantic`
2019-08-18 21:03:21 +00:00