Commit graph

25 commits

Author SHA1 Message Date
d-dorazio
d213040381 Add lint for redundant pattern matching in iflet for Result/Option 2016-10-30 15:43:46 +01:00
mcarton
ffa840d4f2
Use utils::sugg in match related lints
Also don't build suggestion when unnecessary.
2016-07-03 23:27:37 +02:00
mcarton
7a1fc9fce5
Use utils::sugg in MATCH_BOOL 2016-07-01 17:12:48 +02:00
mcarton
9e76bcee5d
Improve matches tests 2016-06-29 17:10:21 +02:00
mcarton
dd3fd41a03
Use span_suggestion for WHILE_LET_ON_ITERATOR 2016-06-07 18:32:40 +02:00
Andre Bogus
2811dd64ec added missing PatKind::Path + tests 2016-05-31 23:35:42 +02:00
mcarton
aa10c93e8f
Fix tests 2016-05-08 01:13:05 +02:00
mcarton
9cfc6124a3 Improve the MATCH_REF_PATS suggestions 2016-03-09 16:22:31 +01:00
mcarton
cbbc667b1b Dogfood for future MATCH_SAME_ARMS lint 2016-02-12 14:30:26 +01:00
Oliver 'ker' Schneider
d6c0435c81 lint on single match expressions with a value in the else path 2016-02-01 11:29:03 +01:00
mcarton
9f641a1009 Add known enums to SINGLE_MATCH 2016-01-13 01:19:27 +01:00
mcarton
d01987a40b Include error message in tests 2015-12-23 11:26:35 +01:00
mcarton
3373ea43c0 Consider literal patterns in MATCH_OVERLAPPING_ARM 2015-12-23 02:42:01 +01:00
mcarton
7216e83189 Implement #471 2015-12-23 02:42:01 +01:00
Seo Sanghyeon
746991572f Extend match_ref_pats to desugared matches 2015-11-25 02:47:17 +09:00
Seo Sanghyeon
b17e38782e Remove trailing commas in match arms with blocks 2015-11-17 13:39:42 +09:00
Manish Goregaokar
140c34f85e Tests shouldn't be executable (fixes #444) 2015-11-09 08:49:20 +05:30
wartman4404
8e4c2171d2 Don't show single_match if match_bool also applies 2015-10-28 22:26:48 -05:00
Andre Bogus
da82e2d3ba added code snippet help to match_bool 2015-10-21 08:24:56 +02:00
Vikas Kumar
2951b70d15 Match on bool should be replaced with if..else block
1. Added another conditional in `check_expr` impl to lint if match expr
is a bool.
2. Test cases.
2015-10-20 10:18:48 -07:00
Manish Goregaokar
3609a2211a Handle let ref in toplevel_ref_arg as well 2015-09-22 12:46:51 +05:30
Georg Brandl
e3ee87965e ref matches: false positive with only wildcard pattern match (fixes #335) 2015-09-17 07:25:08 +02:00
llogiq
0fb7d1d2d9 reporting improvements 2015-09-02 08:19:47 +02:00
Georg Brandl
7580da306e matches: special message for this case
match &e { &Pat1 => {}, &Pat2 => {}, ... }

(inspired by dogfood fixes)
2015-08-22 14:34:39 +02:00
Georg Brandl
017dac2301 new lint: using &Ref patterns instead of matching on *expr (fixes #187) 2015-08-22 14:34:39 +02:00
Renamed from tests/compile-fail/match_if_let.rs (Browse further)