Commit graph

7195 commits

Author SHA1 Message Date
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
bors
6668e629ba 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
2019-08-18 20:34:25 +00:00
Jeremy Stucki
df211ff467
Ignore lines starting with '#' 2019-08-18 18:04:18 +02:00
xd009642
76598adafb Run update_lints 2019-08-18 16:59:31 +01:00
bors
b233685596 Auto merge of #4394 - jeremystucki:suspicious_map, r=flip1995
Implement "suspicious_map" lint

Resolves #4010

changelog: New lint `suspicious_map`.
2019-08-18 15:53:53 +00:00
Jamie McClymont
802a6d33da run-rustfix for unseparated-prefix-literals 2019-08-19 02:58:58 +12:00
Jeremy Stucki
9c39c02b75
Change lint type to 'complexity' 2019-08-18 16:49:11 +02:00
Jamie McClymont
c8fb62148e Add autofixable suggestion for unseparated integer literal suffices 2019-08-19 02:46:12 +12:00
Jeremy Stucki
5df84f2192
Merge branch 'origin/master' into suspicious_map 2019-08-18 16:37:31 +02:00
bors
e92c48989f Auto merge of #4407 - mikerite:fix-breakage-20190818, r=flip1995
Fix breakage due to  rust-lang/rust#61708

Includes commits from #4406

changelog: none
2019-08-18 12:52:35 +00:00
Michael Wright
b313d25350 Fix breakage due to rust-lang/rust#61708 2019-08-18 13:14:47 +02:00
Lzu Tao
533bdfbdbc Fix assertions_on_constants lint 2019-08-18 02:34:30 +07:00
Lzu Tao
439284b584 Make code cleaner and more readable 2019-08-18 01:47:45 +07:00
BO41
b17cb32bcb
Add "could be written as" example to MANUAL_MEMCPY 2019-08-17 13:09:03 +00:00
xd009642
c1e57402d3 Made lint pedantic 2019-08-17 11:45:05 +01:00
bors
49dff2c9f3 Auto merge of #4397 - kraai:remove-a, r=flip1995
Remove "a" from single_match_else description

changelog: none
2019-08-16 20:04:39 +00:00
bors
b83dece263 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
2019-08-16 19:34:11 +00:00
bors
70f12dce02 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
2019-08-16 17:09:28 +00:00
flip1995
2456b355f2
Run rustfmt 2019-08-16 19:05:44 +02:00
KRAAI, MATTHEW [VISUS]
f74d9db7f4 Use outer_expn_data instead of outer_expn_info 2019-08-16 09:31:12 -07:00
KRAAI, MATTHEW [VISUS]
a68abc03a2 Remove "a" from single_match_else description 2019-08-16 05:41:35 -07:00
bors
348d398b1c 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
2019-08-16 04:49:53 +00:00
Lzu Tao
65b906a8fc Rustup "Remove Spanned from {ast,hir}::FieldPat" 2019-08-16 09:32:27 +07:00
Jeremy Stucki
72e4e4ac6c
Add ui test 2019-08-15 22:58:32 +02:00
Jeremy Stucki
f4f31a4ff4
Implement lint 'suspicious_map' 2019-08-15 22:58:32 +02:00
Philipp Hansch
781794d49f
Remove util/update_lints.py
This has been deprecated for ~10 months, so I think it's fine to remove now.
2019-08-15 17:43:30 +02:00
Philipp Hansch
90a4293759
Remove publishing things
Clippy is no longer published via crates.io, so these docs and the
script are not needed anymore.
2019-08-15 17:42:05 +02:00
bors
f95c87ecea 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
2019-08-15 14:09:48 +00:00
flip1995
ebd3eeaede
Also specify patch version of toml crate 2019-08-15 15:58:36 +02:00
bors
607b8299c5 Auto merge of #4382 - jeremystucki:unnecessary_fold_span, r=flip1995
Change span of unnecessary_fold lint

Resolves #4381

changelog: Change linted span of `unnecessary_fold`
2019-08-15 12:57:51 +00:00
bors
a3da66d6d3 Auto merge of #4348 - phansch:deprecate-unused-unused-collect, r=flip1995
Deprecate unused_collect lint

I found this because we only had two test cases in total for this lint.
It turns out the functionality is fully covered by rustc these days.

[Playground Examples](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=eb8ee6db389c77180c9fb152d3c608f4)

changelog: Deprecate `unused_collect` lint. This is fully covered by rustc's `#[must_use]` on `collect`

cc #2846
2019-08-15 10:47:20 +00:00
bors
33ec66a96f Auto merge of #4389 - flip1995:allow_win_failures, r=phansch
Allow windows failures on travis

The windows build breaks about every second travis run. Let's disable it, until we got a fix.

changelog: none
2019-08-15 10:04:56 +00:00
flip1995
911c3de909
Allow failures on the travis windows build again 2019-08-15 11:33:28 +02:00
bors
34457fbd8b Auto merge of #4388 - flip1995:rustup, r=phansch
Rustup

Supersedes #4387 and #4385

This removes tests with the `try!` macro in them completely. There is no need for Clippy to support the `try!` macro, since it is deprecated now.

[`StmtKind`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/enum.StmtKind.html) got a new variant [`Semi`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/enum.StmtKind.html#variant.Semi), which Just Works with the `author` lint. Nice.

changelog: none
2019-08-15 09:13:51 +00:00