Remove TraitDef::generics.

Because it's always empty.
This commit is contained in:
Nicholas Nethercote 2022-11-14 15:43:10 +11:00
parent 96280b6a1d
commit 111db7d3a8
13 changed files with 32 additions and 46 deletions

View file

@ -392,15 +392,7 @@ pub struct Generics {
impl Default for Generics {
/// Creates an instance of `Generics`.
fn default() -> Generics {
Generics {
params: Vec::new(),
where_clause: WhereClause {
has_where_token: false,
predicates: Vec::new(),
span: DUMMY_SP,
},
span: DUMMY_SP,
}
Generics { params: Vec::new(), where_clause: Default::default(), span: DUMMY_SP }
}
}
@ -415,6 +407,12 @@ pub struct WhereClause {
pub span: Span,
}
impl Default for WhereClause {
fn default() -> WhereClause {
WhereClause { has_where_token: false, predicates: Vec::new(), span: DUMMY_SP }
}
}
/// A single predicate in a where-clause.
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum WherePredicate {