mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-23 05:55:25 +00:00
Add names to BareFnTy
This commit is contained in:
parent
cce93436d3
commit
3493c62ff2
@ -574,7 +574,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
|
||||
TyTup(ref tuple_element_types) => {
|
||||
walk_list!(visitor, visit_ty, tuple_element_types);
|
||||
}
|
||||
TyBareFn(ref function_declaration) => {
|
||||
TyBareFn(ref function_declaration, _) => {
|
||||
visitor.visit_fn_decl(&function_declaration.decl);
|
||||
walk_list!(visitor, visit_lifetime_def, &function_declaration.lifetimes);
|
||||
}
|
||||
|
@ -673,7 +673,15 @@ impl<'a> LoweringContext<'a> {
|
||||
unsafety: self.lower_unsafety(f.unsafety),
|
||||
abi: f.abi,
|
||||
decl: self.lower_fn_decl(&f.decl),
|
||||
}))
|
||||
},
|
||||
decl.inputs.iter().map(|arg| {
|
||||
match arg.pat.node {
|
||||
PatKind::Ident(_, ident, None) => {
|
||||
respan(ident.span, ident.node.name)
|
||||
}
|
||||
_ => respan(arg.pat.span, keywords::Invalid.name()),
|
||||
}
|
||||
}).collect()))
|
||||
}
|
||||
TyKind::Never => hir::TyNever,
|
||||
TyKind::Tup(ref tys) => {
|
||||
|
Loading…
Reference in New Issue
Block a user