Lifting Generics from MethodSig to TraitItem and ImplItem since we want to support generics in each variant of TraitItem and ImplItem
This commit is contained in:
parent
f6d7514545
commit
f61394f0bd
11 changed files with 51 additions and 40 deletions
|
@ -506,6 +506,7 @@ impl<'a> TraitDef<'a> {
|
|||
vis: ast::Visibility::Inherited,
|
||||
defaultness: ast::Defaultness::Final,
|
||||
attrs: Vec::new(),
|
||||
generics: Generics::default(),
|
||||
node: ast::ImplItemKind::Type(type_def.to_ty(cx, self.span, type_ident, generics)),
|
||||
tokens: None,
|
||||
}
|
||||
|
@ -921,12 +922,12 @@ impl<'a> MethodDef<'a> {
|
|||
ast::ImplItem {
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
attrs: self.attributes.clone(),
|
||||
generics: fn_generics,
|
||||
span: trait_.span,
|
||||
vis: ast::Visibility::Inherited,
|
||||
defaultness: ast::Defaultness::Final,
|
||||
ident: method_ident,
|
||||
node: ast::ImplItemKind::Method(ast::MethodSig {
|
||||
generics: fn_generics,
|
||||
abi,
|
||||
unsafety,
|
||||
constness:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue