mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Change visit_precise_capturing_arg so it returns a Self::Result
This commit is contained in:
parent
6295686a37
commit
9fde49b338
@ -200,8 +200,8 @@ pub trait Visitor<'ast>: Sized {
|
|||||||
fn visit_param_bound(&mut self, bounds: &'ast GenericBound, _ctxt: BoundKind) -> Self::Result {
|
fn visit_param_bound(&mut self, bounds: &'ast GenericBound, _ctxt: BoundKind) -> Self::Result {
|
||||||
walk_param_bound(self, bounds)
|
walk_param_bound(self, bounds)
|
||||||
}
|
}
|
||||||
fn visit_precise_capturing_arg(&mut self, arg: &'ast PreciseCapturingArg) {
|
fn visit_precise_capturing_arg(&mut self, arg: &'ast PreciseCapturingArg) -> Self::Result {
|
||||||
walk_precise_capturing_arg(self, arg);
|
walk_precise_capturing_arg(self, arg)
|
||||||
}
|
}
|
||||||
fn visit_poly_trait_ref(&mut self, t: &'ast PolyTraitRef) -> Self::Result {
|
fn visit_poly_trait_ref(&mut self, t: &'ast PolyTraitRef) -> Self::Result {
|
||||||
walk_poly_trait_ref(self, t)
|
walk_poly_trait_ref(self, t)
|
||||||
@ -730,14 +730,10 @@ pub fn walk_param_bound<'a, V: Visitor<'a>>(visitor: &mut V, bound: &'a GenericB
|
|||||||
pub fn walk_precise_capturing_arg<'a, V: Visitor<'a>>(
|
pub fn walk_precise_capturing_arg<'a, V: Visitor<'a>>(
|
||||||
visitor: &mut V,
|
visitor: &mut V,
|
||||||
arg: &'a PreciseCapturingArg,
|
arg: &'a PreciseCapturingArg,
|
||||||
) {
|
) -> V::Result {
|
||||||
match arg {
|
match arg {
|
||||||
PreciseCapturingArg::Lifetime(lt) => {
|
PreciseCapturingArg::Lifetime(lt) => visitor.visit_lifetime(lt, LifetimeCtxt::GenericArg),
|
||||||
visitor.visit_lifetime(lt, LifetimeCtxt::GenericArg);
|
PreciseCapturingArg::Arg(path, id) => visitor.visit_path(path, *id),
|
||||||
}
|
|
||||||
PreciseCapturingArg::Arg(path, id) => {
|
|
||||||
visitor.visit_path(path, *id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user