Commit Graph

6032 Commits

Author SHA1 Message Date
pJunger
1c86b3758d Fixed clippy lints in checked_conversions.rs. 2019-05-18 09:33:26 +02:00
pJunger
14d948c560 Registered lint. 2019-05-18 09:33:25 +02:00
pJunger
47444c44ad Added lint for TryFrom for checked integer conversion rust-lang#3947. 2019-05-18 09:33:25 +02:00
bors
60a609acae Auto merge of #4110 - rust-lang:symbolic_wasteland, r=oli-obk
Prevent symbocalypse

r? @Manishearth

This is strictly better, we can just not modify rustc and bump solely the clippy submodule and then implement diagnostic lang items without beta looming over us

changelog: none
2019-05-17 23:47:49 +00:00
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
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
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
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
Manish Goregaokar
0499184201 Ignore desugarings in macro checks 2019-05-10 23:40:42 -07:00
Manish Goregaokar
5661e5947f Add IfDesugar to desugaring_name 2019-05-10 23:40:42 -07:00
Manish Goregaokar
26ebc3e9a1 Fix consts.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
c9ed92ce20 More uses of higher::if_block 2019-05-10 23:40:42 -07:00
Manish Goregaokar
69b1da4d82 Remove some unnecessary If arms 2019-05-10 23:40:42 -07:00
Manish Goregaokar
da8b56d99a Fix needless_bool.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
09a93291ec Fix question_mark.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
f40c77a776 Fix shadow.rs 2019-05-10 23:40:42 -07:00
Manish Goregaokar
62897747fd Fix unwrap.rs 2019-05-10 23:40:42 -07:00