Skip to content

Commit a111716

Browse files
authored
Rollup merge of #133049 - maxcabrajac:visit_precise_capturing_arg, r=compiler-errors
Change Visitor::visit_precise_capturing_arg so it returns a Visitor::Result r? `@petrochenkov` related to #128974
2 parents 249a910 + 9fde49b commit a111716

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

compiler/rustc_ast/src/visit.rs

+5-9
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ pub trait Visitor<'ast>: Sized {
200200
fn visit_param_bound(&mut self, bounds: &'ast GenericBound, _ctxt: BoundKind) -> Self::Result {
201201
walk_param_bound(self, bounds)
202202
}
203-
fn visit_precise_capturing_arg(&mut self, arg: &'ast PreciseCapturingArg) {
204-
walk_precise_capturing_arg(self, arg);
203+
fn visit_precise_capturing_arg(&mut self, arg: &'ast PreciseCapturingArg) -> Self::Result {
204+
walk_precise_capturing_arg(self, arg)
205205
}
206206
fn visit_poly_trait_ref(&mut self, t: &'ast PolyTraitRef) -> Self::Result {
207207
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
730730
pub fn walk_precise_capturing_arg<'a, V: Visitor<'a>>(
731731
visitor: &mut V,
732732
arg: &'a PreciseCapturingArg,
733-
) {
733+
) -> V::Result {
734734
match arg {
735-
PreciseCapturingArg::Lifetime(lt) => {
736-
visitor.visit_lifetime(lt, LifetimeCtxt::GenericArg);
737-
}
738-
PreciseCapturingArg::Arg(path, id) => {
739-
visitor.visit_path(path, *id);
740-
}
735+
PreciseCapturingArg::Lifetime(lt) => visitor.visit_lifetime(lt, LifetimeCtxt::GenericArg),
736+
PreciseCapturingArg::Arg(path, id) => visitor.visit_path(path, *id),
741737
}
742738
}
743739

0 commit comments

Comments
 (0)