Skip to content

Commit

Permalink
review comment: use Default
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Oct 19, 2019
1 parent cdc5400 commit 10ce36c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/librustc_resolve/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ impl<'a> PathSource<'a> {
}
}

#[derive(Default)]
struct DiagnosticMetadata {
/// The current trait's associated types' ident, used for diagnostic suggestions.
current_trait_assoc_types: Vec<Ident>,
Expand Down Expand Up @@ -568,15 +569,7 @@ impl<'a, 'b> LateResolutionVisitor<'a, '_> {
},
label_ribs: Vec::new(),
current_trait_ref: None,
diagnostic_metadata: DiagnosticMetadata {
current_trait_assoc_types: Vec::new(),
current_self_type: None,
current_self_item: None,
current_function: None,
unused_labels: Default::default(),
current_type_ascription: Vec::new(),
current_let_binding: None,
}
diagnostic_metadata: DiagnosticMetadata::default(),
}
}

Expand Down

0 comments on commit 10ce36c

Please sign in to comment.