Commit graph

6252 commits

Author SHA1 Message Date
Oliver Scherer
f49ef0ec04 Dogfood 2019-05-18 01:42:15 +02:00
Oliver Scherer
462df72100 Dogfood and rustfmt 2019-05-18 00:58:25 +02:00
Oliver Scherer
568a3ecfc3 Turn off two tests broken due to #4108 2019-05-18 00:57:23 +02:00
Oliver Scherer
f7f85a0dca Prevent symbocalypse 2019-05-17 23:53:54 +02:00
Manish Goregaokar
9ba60b8333 Merge remote-tracking branch 'origin/beta1.35' into backport-merge 2019-05-17 12:56:53 -07:00
Manish Goregaokar
f5b107ef6f Merge remote-tracking branch 'origin/rust-1.34.1' into HEAD 2019-05-17 12:54:28 -07:00
Manish Goregaokar
80eb7b9503 Merge remote-tracking branch 'origin/rust-1.31.0' into HEAD 2019-05-17 12:54:15 -07:00
Manish Goregaokar
a7fe3b2ebb Merge remote-tracking branch 'origin/beta_backport' into HEAD 2019-05-17 12:53:52 -07:00
bors
265318dba9 Auto merge of #4104 - Manishearth:beta-backports, r=flip1995
Backport #4101 to beta

This lint has been causing lots of problems.

I'll check up on other potential beta backports when I build the new changelog

r? @oli-obk
2019-05-17 14:14:53 +00:00
Oliver Scherer
28bde0638e Don't require rustfmt on beta 2019-05-17 15:47:11 +02:00
Oliver Scherer
64a9f568e9 Don't run dogfood on windows 2019-05-17 13:19:28 +02:00
Manish Goregaokar
9170ca3349 Backport #4101
https://github.com/rust-lang/rust-clippy/pull/4101

Splits up redundant_closure's method checking into a pedantic lint
2019-05-17 13:05:43 +02:00
Philipp Hansch
619a2906f8
Collect at callsite, use eprintln instead of println 2019-05-17 07:41:25 +02:00
Philipp Hansch
d9a8a8a778
Add a stderr file length check to clippy_dev
This adds a check to `clippy_dev` that enforces a maximum line count for
`stderr` files. CI will fail if the line count is exceeded. It's
currently set to `320` lines.

Ideally this would be implemented in `compiletest-rs` but there are
plans to move Rust's `compiletest` into the `compiletest-rs` repository
and I don't want to do the work in `compiletest` twice. However, I also
don't want to wait until the move is done, so I added the check to
`clippy_dev` until it makes sense to add it to compiletest-rs.

cc #2038
2019-05-16 21:18:32 +02:00
bors
11194e3d05 Auto merge of #4101 - mikerite:redundant_closures_for_method_calls, r=Manishearth
Split redundant_closure lint

Move the method checking into a new lint called
`redundant_closures_for_method_calls` and put it in the pedantic group.

This aspect of the lint seems more controversial than the rest.

cc #3942

changelog: Move method checking from `redundant_closure` to a new `pedantic` lint called `redundant_closure_for_method_calls`.
2019-05-16 18:18:58 +00:00
flip1995
08d2a0d6b2
Also rename the lint in test files 2019-05-16 20:18:07 +02:00
Manish Goregaokar
ce63f3ae4d Add known problems 2019-05-16 09:43:07 -07:00
Manish Goregaokar
373d270673 Rename to redundant_closure_for_method_calls 2019-05-16 09:18:50 -07:00
Vincent Dal Maso
bfb230369e Add test for multiple same arms lints
Changes:
- Add a test to match multiple arms in the same match statement
2019-05-16 14:13:57 +02:00
Vincent Dal Maso
902726c38d Fix match_same_arms to fail late
Changes:
- Add a function search_same_list which return a list of matched expressions
- Change the match_same_arms implementation behaviour. It will lint each same arms found.
2019-05-16 11:27:45 +02:00
Michael Wright
4fcaab3d62 Split redundant_closure lint
Move the method checking into a new lint called
`redundant_closures_for_method_calls` and put it in the pedantic group.

This aspect of the lint seems more controversial than the rest.

cc #3942
2019-05-16 08:25:39 +02:00
flip1995
3543f58c84
Add macro check for unreadable_literal lint
Closes #4094
2019-05-15 14:57:56 +02:00
bors
f49d878ce5 Auto merge of #4066 - rust-lang:hash, r=Manishearth
Properly hash enums

While I wrote this I was saved by a clippy lint... I accidentally fetched the discriminant of a reference to an enum and not of an enum.

changelog: reduce hash collisions during clippy-internal hashing
2019-05-15 05:40:02 +00:00
flip1995
5dea5d404c
Fix dogfood errors 2019-05-14 15:08:29 +02:00
flip1995
4b4d734758
Also hash mem::discriminant in hash_stmt 2019-05-14 14:13:23 +02:00
Oliver Scherer
f11b236087
mem::discriminant trumps manual discriminant hashing 2019-05-14 14:04:55 +02:00
bors
82b2dfb9f6 Auto merge of #4095 - flip1995:mscn_test, r=phansch
Add test for #3198

Closes #3198

changelog: none
2019-05-14 12:02:22 +00:00
Oliver Scherer
bc031d4c74
Properly hash enums 2019-05-14 13:57:48 +02:00
flip1995
861d233256
Add test for #3198 2019-05-14 13:46:10 +02:00
bors
501830bf01 Auto merge of #4084 - mikerite:fix-4019, r=oli-obk
Fix 4019

Fixes #4019
2019-05-14 11:26:16 +00:00
bors
ad3269c4b5 Auto merge of #4093 - rust-lang:rustup, r=oli-obk
Rustup to rustc 1.36.0-nightly (1764b2972 2019-05-12)
2019-05-14 09:02:01 +00:00
Oliver Scherer
dfbc74b08b Rustfmt all the things 2019-05-14 10:33:48 +02:00
Oliver Scherer
af80c53450 Clippy dogfood 2019-05-14 10:33:48 +02:00
Oliver Scherer
8612346de1 Update for compiletest changes 2019-05-14 10:33:48 +02:00
Oliver Scherer
b2dbda4d48 Use symbols instead of strings 2019-05-14 10:33:42 +02:00
Manish Goregaokar
42480fd031 Rustup to rustc 1.36.0-nightly (1764b2972 2019-05-12) 2019-05-13 11:39:14 -07:00
bors
c79838e5d6 Auto merge of #4089 - flip1995:id_conv_reg_test, r=Manishearth
Add regression test for identity_conversion FP

cc #3913 #4082 #3936

changelog: none
2019-05-12 19:37:39 +00:00
flip1995
a5bcaf538d
Add regression test for identity_conversion FP 2019-05-12 21:32:29 +02:00
bors
2122bdb94b Auto merge of #4087 - phansch:move_tests, r=matthiaskrgr
UI test cleanup: Extract many_single_char_names tests

changelog: none

cc #2038, #4086
2019-05-12 17:36:39 +00:00
Philipp Hansch
915ada04f5
UI test cleanup: Extract many_single_char_names tests 2019-05-12 18:40:32 +02:00
bors
e9b7a7125e Auto merge of #4085 - phansch:empty_loop_tests, r=matthiaskrgr
Add tests for empty_loop lint

changelog: none

Closes #4072
2019-05-12 13:50:57 +00:00
Philipp Hansch
9a24ab8466
Add tests for empty_loop lint 2019-05-12 13:07:58 +02:00
bors
feb18c364c Auto merge of #4082 - Manishearth:macro-check-split, r=oli-obk
Make most macro checks also check for desugarings

We should audit the macro checks one by one and re-add `in_macro`. I suspect it's applicable to most of them.

fixes https://github.com/rust-lang/rust-clippy/issues/4081
2019-05-12 11:06:29 +00:00
Michael Wright
2efd8c6e05 Fix comments; minor refactoring 2019-05-12 10:32:19 +02:00
Michael Wright
e6e3f24e0c Fix #4019 2019-05-12 10:18:38 +02:00
Michael Wright
c44a882a84 Move ctor tests from methods.rs to or_fun_calls.rs 2019-05-12 09:32:39 +02:00
Manish Goregaokar
abf6481f87 Add in_macro again 2019-05-11 21:39:37 -07:00
Manish Goregaokar
7eb8018554 Rename in_macro to in_macro_or_desugar 2019-05-11 21:39:02 -07:00
bors
3710ec5996 Auto merge of #4080 - rust-lang:rustup, r=oli-obk
Rustup to rustc 1.36.0-nightly (acc7e652f 2019-05-10)

Fixes breakages from https://github.com/rust-lang/rust/pull/59288

Not finished yet, help appreciated.

Todo:

 - [x] Needs to build
 - [x] Util should handle DropTemps, https://github.com/rust-lang/rust-clippy/pull/4080#discussion_r283079202
 - [x] Author lint should spit out higher::if_block checks
 - [x] Unsure what to do in consts.rs
 - [x] Needs to pass tests
2019-05-11 11:35:54 +00:00
Manish Goregaokar
19cfb84405 Start handling desugarings in author lint 2019-05-10 23:43:58 -07:00