Skip to content

Commit 10ce36c

Browse files
committed
review comment: use Default
1 parent cdc5400 commit 10ce36c

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/librustc_resolve/late.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ impl<'a> PathSource<'a> {
320320
}
321321
}
322322

323+
#[derive(Default)]
323324
struct DiagnosticMetadata {
324325
/// The current trait's associated types' ident, used for diagnostic suggestions.
325326
current_trait_assoc_types: Vec<Ident>,
@@ -568,15 +569,7 @@ impl<'a, 'b> LateResolutionVisitor<'a, '_> {
568569
},
569570
label_ribs: Vec::new(),
570571
current_trait_ref: None,
571-
diagnostic_metadata: DiagnosticMetadata {
572-
current_trait_assoc_types: Vec::new(),
573-
current_self_type: None,
574-
current_self_item: None,
575-
current_function: None,
576-
unused_labels: Default::default(),
577-
current_type_ascription: Vec::new(),
578-
current_let_binding: None,
579-
}
572+
diagnostic_metadata: DiagnosticMetadata::default(),
580573
}
581574
}
582575

0 commit comments

Comments
 (0)