File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -1280,6 +1280,7 @@ declare_lint! {
12801280 "`...` range patterns are deprecated"
12811281}
12821282
1283+ #[ derive( Default ) ]
12831284pub struct EllipsisInclusiveRangePatterns {
12841285 /// If `Some(_)`, suppress all subsequent pattern
12851286 /// warnings for better diagnostics.
@@ -1288,14 +1289,6 @@ pub struct EllipsisInclusiveRangePatterns {
12881289
12891290impl_lint_pass ! ( EllipsisInclusiveRangePatterns => [ ELLIPSIS_INCLUSIVE_RANGE_PATTERNS ] ) ;
12901291
1291- impl EllipsisInclusiveRangePatterns {
1292- pub fn new ( ) -> Self {
1293- Self {
1294- node_id : None ,
1295- }
1296- }
1297- }
1298-
12991292impl EarlyLintPass for EllipsisInclusiveRangePatterns {
13001293 fn check_pat ( & mut self , cx : & EarlyContext < ' _ > , pat : & ast:: Pat ) {
13011294 if self . node_id . is_some ( ) {
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ macro_rules! early_lint_passes {
9494 UnusedImportBraces : UnusedImportBraces ,
9595 UnsafeCode : UnsafeCode ,
9696 AnonymousParameters : AnonymousParameters ,
97- EllipsisInclusiveRangePatterns : EllipsisInclusiveRangePatterns :: new ( ) ,
97+ EllipsisInclusiveRangePatterns : EllipsisInclusiveRangePatterns :: default ( ) ,
9898 NonCamelCaseTypes : NonCamelCaseTypes ,
9999 DeprecatedAttr : DeprecatedAttr :: new( ) ,
100100 ] ) ;
You can’t perform that action at this time.
0 commit comments