mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
GenericParam
This commit is contained in:
parent
f4fbe88a4d
commit
8b0284afd3
@ -287,6 +287,10 @@ pub trait MutVisitor: Sized {
|
|||||||
walk_variant_data(self, vdata);
|
walk_variant_data(self, vdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn visit_generic_param(&mut self, param: &mut GenericParam) {
|
||||||
|
walk_generic_param(self, param)
|
||||||
|
}
|
||||||
|
|
||||||
fn flat_map_generic_param(&mut self, param: GenericParam) -> SmallVec<[GenericParam; 1]> {
|
fn flat_map_generic_param(&mut self, param: GenericParam) -> SmallVec<[GenericParam; 1]> {
|
||||||
walk_flat_map_generic_param(self, param)
|
walk_flat_map_generic_param(self, param)
|
||||||
}
|
}
|
||||||
@ -974,11 +978,8 @@ fn walk_precise_capturing_arg<T: MutVisitor>(vis: &mut T, arg: &mut PreciseCaptu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn walk_flat_map_generic_param<T: MutVisitor>(
|
pub fn walk_generic_param<T: MutVisitor>(vis: &mut T, param: &mut GenericParam) {
|
||||||
vis: &mut T,
|
let GenericParam { id, ident, attrs, bounds, kind, colon_span, is_placeholder: _ } = param;
|
||||||
mut param: GenericParam,
|
|
||||||
) -> SmallVec<[GenericParam; 1]> {
|
|
||||||
let GenericParam { id, ident, attrs, bounds, kind, colon_span, is_placeholder: _ } = &mut param;
|
|
||||||
vis.visit_id(id);
|
vis.visit_id(id);
|
||||||
visit_attrs(vis, attrs);
|
visit_attrs(vis, attrs);
|
||||||
vis.visit_ident(ident);
|
vis.visit_ident(ident);
|
||||||
@ -996,6 +997,13 @@ pub fn walk_flat_map_generic_param<T: MutVisitor>(
|
|||||||
if let Some(colon_span) = colon_span {
|
if let Some(colon_span) = colon_span {
|
||||||
vis.visit_span(colon_span);
|
vis.visit_span(colon_span);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn walk_flat_map_generic_param<T: MutVisitor>(
|
||||||
|
vis: &mut T,
|
||||||
|
mut param: GenericParam,
|
||||||
|
) -> SmallVec<[GenericParam; 1]> {
|
||||||
|
vis.visit_generic_param(&mut param);
|
||||||
smallvec![param]
|
smallvec![param]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user