]>
git.lizzy.rs Git - rust.git/log
bors [Mon, 26 Aug 2019 14:32:12 +0000 (14:32 +0000)]
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
bors [Mon, 26 Aug 2019 13:29:01 +0000 (13:29 +0000)]
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
Philipp Hansch [Mon, 26 Aug 2019 13:28:35 +0000 (15:28 +0200)]
Use correct path in comment
Co-Authored-By: Philipp Krones <hello@philkrones.com>
bors [Mon, 26 Aug 2019 12:46:00 +0000 (12:46 +0000)]
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
Lzu Tao [Mon, 26 Aug 2019 10:11:47 +0000 (17:11 +0700)]
Add regression test for looking for trait defid in nocore
bors [Mon, 26 Aug 2019 11:11:57 +0000 (11:11 +0000)]
Auto merge of #4436 - BO41:written_as, r=phansch
Add some "could be written as" examples
fixes #4405
changelog: none
bors [Mon, 26 Aug 2019 10:32:24 +0000 (10:32 +0000)]
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
bors [Mon, 26 Aug 2019 09:53:34 +0000 (09:53 +0000)]
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
bors [Mon, 26 Aug 2019 09:15:20 +0000 (09:15 +0000)]
Auto merge of #4431 - phansch:more_rustfix, r=flip1995
Add 3 more run-rustfix headers
changelog: none
cc #3630
Lzu Tao [Mon, 26 Aug 2019 09:11:43 +0000 (16:11 +0700)]
Cleaner code for unsep literals
flip1995 [Mon, 26 Aug 2019 08:06:24 +0000 (10:06 +0200)]
Remove empty *.std{err,out} files
Hristo Venev [Sun, 25 Aug 2019 17:49:45 +0000 (17:49 +0000)]
Mark rust source file as non-executable.
Lzu Tao [Thu, 22 Aug 2019 03:03:26 +0000 (10:03 +0700)]
Account for trait alias when looking for defid
bors [Sun, 25 Aug 2019 06:25:35 +0000 (06:25 +0000)]
Auto merge of #4447 - phansch:fix_build, r=matthiaskrgr
Rustup to https://github.com/rust-lang/rust/pull/63854
changelog: none
Philipp Hansch [Sun, 25 Aug 2019 06:06:32 +0000 (08:06 +0200)]
Rustup to https://github.com/rust-lang/rust/pull/63854
Philipp Hansch [Sat, 24 Aug 2019 19:42:39 +0000 (21:42 +0200)]
Fix unused_unit false positive
Fixes #4076
BO41 [Sat, 24 Aug 2019 09:34:40 +0000 (11:34 +0200)]
Fix lint doc
Philipp Hansch [Sat, 24 Aug 2019 07:23:06 +0000 (09:23 +0200)]
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
bors [Sat, 24 Aug 2019 07:45:29 +0000 (07:45 +0000)]
Auto merge of #4443 - jeremystucki:methods-refactoring, r=phansch
Small refactoring of methods/mod.rs
changelog: none
Jeremy Stucki [Fri, 23 Aug 2019 20:52:04 +0000 (22:52 +0200)]
Refactor some minor things
Jeremy Stucki [Fri, 23 Aug 2019 20:51:44 +0000 (22:51 +0200)]
Use more if-chains
Jeremy Stucki [Fri, 23 Aug 2019 20:31:22 +0000 (22:31 +0200)]
Refactor 'lint_or_fun_call'
Jeremy Stucki [Fri, 23 Aug 2019 12:36:00 +0000 (14:36 +0200)]
Refactor 'check_unwrap_or_default'
Jeremy Stucki [Fri, 23 Aug 2019 12:20:55 +0000 (14:20 +0200)]
Refactor 'check_impl_item'
bors [Fri, 23 Aug 2019 11:51:50 +0000 (11:51 +0000)]
Auto merge of #4409 - jeremystucki:export, r=phansch
[Doc] Ignore lines starting with #
Resolves #4353
changelog: none
bors [Fri, 23 Aug 2019 11:12:04 +0000 (11:12 +0000)]
Auto merge of #4438 - lzutao:author-litstr-missing, r=phansch
Add missing field to LitKind::Str
changelog: none
Lzu Tao [Fri, 23 Aug 2019 01:28:44 +0000 (08:28 +0700)]
Add missing field to LitKind::Str
bors [Fri, 23 Aug 2019 10:23:52 +0000 (10:23 +0000)]
Auto merge of #4439 - lzutao:fix-format, r=phansch
Re-factor format lint
cc #4432
changelog: none
Lzu Tao [Fri, 23 Aug 2019 09:49:49 +0000 (09:49 +0000)]
Run update_lints for Unicode lint
Lzu Tao [Fri, 23 Aug 2019 08:46:23 +0000 (15:46 +0700)]
Re-add false positive check
Lzu Tao [Fri, 23 Aug 2019 08:01:41 +0000 (08:01 +0000)]
Add raw string regression test for useless_format lint
Lzu Tao [Fri, 23 Aug 2019 05:26:24 +0000 (12:26 +0700)]
Re-factor useless_format lint
Philipp Hansch [Fri, 23 Aug 2019 07:39:11 +0000 (09:39 +0200)]
Merge pull request #4440 from lzutao/fix-unicode
Update Unicode lint tests
Lzu Tao [Fri, 23 Aug 2019 05:42:45 +0000 (05:42 +0000)]
Update Unicode lint tests
BO41 [Tue, 20 Aug 2019 14:55:17 +0000 (16:55 +0200)]
Add examples to some complexity lints
BO41 [Tue, 20 Aug 2019 14:23:53 +0000 (16:23 +0200)]
Add example to a perf lint
BO41 [Sun, 18 Aug 2019 19:37:47 +0000 (21:37 +0200)]
Add examples to some correctness lints
Philipp Hansch [Thu, 22 Aug 2019 05:47:30 +0000 (07:47 +0200)]
Add run-rustfix for range_plus_minus_one tests
Philipp Hansch [Thu, 22 Aug 2019 05:41:00 +0000 (07:41 +0200)]
Add run-rustfix for or_fun_call tests
Philipp Hansch [Thu, 22 Aug 2019 05:18:08 +0000 (07:18 +0200)]
Add run-rustfix for short_circuit_statement test
bors [Wed, 21 Aug 2019 08:46:10 +0000 (08:46 +0000)]
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
bors [Wed, 21 Aug 2019 08:15:36 +0000 (08:15 +0000)]
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`
bors [Wed, 21 Aug 2019 07:25:58 +0000 (07:25 +0000)]
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
Philipp Hansch [Wed, 21 Aug 2019 05:43:42 +0000 (07:43 +0200)]
Add two more tests, allow 2 other lints.
Michael Wright [Wed, 21 Aug 2019 05:35:04 +0000 (07:35 +0200)]
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 ).
Philipp Hansch [Thu, 8 Aug 2019 19:27:50 +0000 (21:27 +0200)]
Add more testcases for redundant_pattern_matching
These should make sure that, when the suggestions are fixed, they are
fixed for all these cases.
Philipp Hansch [Wed, 7 Aug 2019 18:34:23 +0000 (20:34 +0200)]
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.
Philipp Hansch [Wed, 21 Aug 2019 05:23:48 +0000 (07:23 +0200)]
Add note on how to find the latest beta commit
bors [Tue, 20 Aug 2019 23:26:12 +0000 (23:26 +0000)]
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 :tada:
changelog: none
Lzu Tao [Tue, 20 Aug 2019 23:21:39 +0000 (23:21 +0000)]
Remove feature gate for async_await
bors [Tue, 20 Aug 2019 08:22:23 +0000 (08:22 +0000)]
Auto merge of #4419 - lzutao:ifchain-link, r=phansch
Update if_chain doc link
changelog: none
bors [Tue, 20 Aug 2019 07:54:25 +0000 (07:54 +0000)]
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
bors [Tue, 20 Aug 2019 05:33:23 +0000 (05:33 +0000)]
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
Philipp Hansch [Tue, 20 Aug 2019 05:28:59 +0000 (07:28 +0200)]
Merge pull request #4416 from SimonSapin/plugin
Import rustc_plugin from its new location
Philipp Hansch [Tue, 20 Aug 2019 05:27:14 +0000 (07:27 +0200)]
Disable RLS integration test
until RLS has been updated to the latest Clippy commit.
Lzu Tao [Tue, 20 Aug 2019 02:59:13 +0000 (09:59 +0700)]
Update if_chain doc link
bors [Mon, 19 Aug 2019 19:47:50 +0000 (19:47 +0000)]
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`.
KRAAI, MATTHEW [VISUS] [Mon, 19 Aug 2019 19:38:33 +0000 (12:38 -0700)]
Restore en dashes
KRAAI, MATTHEW [VISUS] [Mon, 19 Aug 2019 16:30:32 +0000 (09:30 -0700)]
Remove in_macro_or_desugar
Simon Sapin [Mon, 19 Aug 2019 15:51:39 +0000 (17:51 +0200)]
Import rustc_plugin from its new location
Depends on https://github.com/rust-lang/rust/pull/62727
bors [Mon, 19 Aug 2019 10:29:11 +0000 (10:29 +0000)]
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.
chansuke [Mon, 19 Aug 2019 09:27:47 +0000 (18:27 +0900)]
Fix the name of a channel of discord in CONTRIBUTING.md
Jamie McClymont [Mon, 19 Aug 2019 08:22:42 +0000 (20:22 +1200)]
Requested test cleanup
bors [Mon, 19 Aug 2019 08:04:12 +0000 (08:04 +0000)]
Auto merge of #4411 - mikerite:fix-4384, r=flip1995
Fix `clone_on_copy` false positives
Closes #4384
changelog: Fix `clone_on_copy` false positives
bors [Mon, 19 Aug 2019 07:35:53 +0000 (07:35 +0000)]
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
bors [Mon, 19 Aug 2019 06:20:01 +0000 (06:20 +0000)]
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
Michael Wright [Mon, 19 Aug 2019 06:17:53 +0000 (08:17 +0200)]
Fix `clone_on_copy` false positives
Closes #4384
Lzu Tao [Mon, 19 Aug 2019 05:41:47 +0000 (05:41 +0000)]
Add test
Matthias Krüger [Mon, 19 Aug 2019 04:10:00 +0000 (06:10 +0200)]
try to fix build in rustc repo
Lzu Tao [Fri, 16 Aug 2019 02:42:07 +0000 (09:42 +0700)]
Allow option_and_then_some in option_map_or_none test
Lzu Tao [Thu, 15 Aug 2019 03:53:11 +0000 (10:53 +0700)]
Add option_and_then_some lint
Jamie McClymont [Mon, 19 Aug 2019 02:18:05 +0000 (14:18 +1200)]
Requested changes
bors [Sun, 18 Aug 2019 21:03:21 +0000 (21:03 +0000)]
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`
bors [Sun, 18 Aug 2019 20:34:25 +0000 (20:34 +0000)]
Auto merge of #4404 - BO41:patch-1, r=flip1995
Add "could be written as" example to MANUAL_MEMCPY
<!--
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 -->
changelog: none
Jeremy Stucki [Sun, 18 Aug 2019 16:04:18 +0000 (18:04 +0200)]
Ignore lines starting with '#'
xd009642 [Sun, 18 Aug 2019 15:59:31 +0000 (16:59 +0100)]
Run update_lints
bors [Sun, 18 Aug 2019 15:53:53 +0000 (15:53 +0000)]
Auto merge of #4394 - jeremystucki:suspicious_map, r=flip1995
Implement "suspicious_map" lint
Resolves #4010
changelog: New lint `suspicious_map`.
Jamie McClymont [Sun, 18 Aug 2019 14:52:59 +0000 (02:52 +1200)]
run-rustfix for unseparated-prefix-literals
Jeremy Stucki [Sun, 18 Aug 2019 14:49:11 +0000 (16:49 +0200)]
Change lint type to 'complexity'
Jamie McClymont [Sat, 17 Aug 2019 05:10:10 +0000 (17:10 +1200)]
Add autofixable suggestion for unseparated integer literal suffices
Jeremy Stucki [Sun, 18 Aug 2019 14:37:31 +0000 (16:37 +0200)]
Merge branch 'origin/master' into suspicious_map
bors [Sun, 18 Aug 2019 12:52:35 +0000 (12:52 +0000)]
Auto merge of #4407 - mikerite:fix-breakage-
20190818 , r=flip1995
Fix breakage due to rust-lang/rust#61708
Includes commits from #4406
changelog: none
Michael Wright [Sun, 18 Aug 2019 11:14:47 +0000 (13:14 +0200)]
Fix breakage due to rust-lang/rust#61708
Lzu Tao [Sat, 17 Aug 2019 18:46:44 +0000 (01:46 +0700)]
Fix assertions_on_constants lint
Lzu Tao [Sat, 17 Aug 2019 18:46:44 +0000 (01:46 +0700)]
Make code cleaner and more readable
BO41 [Sat, 17 Aug 2019 13:09:03 +0000 (13:09 +0000)]
Add "could be written as" example to MANUAL_MEMCPY
xd009642 [Sat, 17 Aug 2019 10:45:05 +0000 (11:45 +0100)]
Made lint pedantic
bors [Fri, 16 Aug 2019 20:04:39 +0000 (20:04 +0000)]
Auto merge of #4397 - kraai:remove-a, r=flip1995
Remove "a" from single_match_else description
changelog: none
bors [Fri, 16 Aug 2019 19:34:11 +0000 (19:34 +0000)]
Auto merge of #4392 - phansch:cleanups, r=flip1995
Remove unused dev scripts/files
781794d4 : Remove util/update_lints.py
* This has been deprecated for ~10 months, so I think it's fine to remove now.
90a42937 : Remove publishing things
* Clippy is no longer published via crates.io, so these docs and the script
are not needed anymore.
changelog: none
bors [Fri, 16 Aug 2019 17:09:28 +0000 (17:09 +0000)]
Auto merge of #4398 - kraai:outer_expn_data, r=flip1995
Use outer_expn_data instead of outer_expn_info
`outer_expn_info` has been removed, so use its replacement, `outer_expn_data`, instead.
changelog: none
flip1995 [Fri, 16 Aug 2019 17:05:44 +0000 (19:05 +0200)]
Run rustfmt
KRAAI, MATTHEW [VISUS] [Fri, 16 Aug 2019 16:29:30 +0000 (09:29 -0700)]
Use outer_expn_data instead of outer_expn_info
KRAAI, MATTHEW [VISUS] [Fri, 16 Aug 2019 12:41:35 +0000 (05:41 -0700)]
Remove "a" from single_match_else description
bors [Fri, 16 Aug 2019 04:49:53 +0000 (04:49 +0000)]
Auto merge of #4395 - lzutao:rustup-63586, r=phansch
Rustup "Remove `Spanned` from `{ast,hir}::FieldPat`"
Rustup https://github.com/rust-lang/rust/pull/63586
changelog: none
Lzu Tao [Fri, 16 Aug 2019 02:30:38 +0000 (09:30 +0700)]
Rustup "Remove `Spanned` from `{ast,hir}::FieldPat`"
Jeremy Stucki [Thu, 15 Aug 2019 20:56:27 +0000 (22:56 +0200)]
Add ui test
Jeremy Stucki [Thu, 15 Aug 2019 20:56:16 +0000 (22:56 +0200)]
Implement lint 'suspicious_map'
Philipp Hansch [Thu, 15 Aug 2019 15:43:30 +0000 (17:43 +0200)]
Remove util/update_lints.py
This has been deprecated for ~10 months, so I think it's fine to remove now.
Philipp Hansch [Thu, 15 Aug 2019 15:42:05 +0000 (17:42 +0200)]
Remove publishing things
Clippy is no longer published via crates.io, so these docs and the
script are not needed anymore.
bors [Thu, 15 Aug 2019 14:09:48 +0000 (14:09 +0000)]
Auto merge of #4391 - flip1995:toml_ver, r=phansch
Also specify patch version of toml crate
cc rust-lang/rust#63587
The patch update of the toml crate to version 0.5.3 recently broke some tests: #4378. For rustc, we have to define the complete version though.
changelog: none