Skip to content

Commit

Permalink
Unrolled build for rust-lang#133049
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#128974
  • Loading branch information
rust-timer authored Nov 15, 2024
2 parents ce40196 + 9fde49b commit c12cb20
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ pub trait Visitor<'ast>: Sized {
fn visit_param_bound(&mut self, bounds: &'ast GenericBound, _ctxt: BoundKind) -> Self::Result {
walk_param_bound(self, bounds)
}
fn visit_precise_capturing_arg(&mut self, arg: &'ast PreciseCapturingArg) {
walk_precise_capturing_arg(self, arg);
fn visit_precise_capturing_arg(&mut self, arg: &'ast PreciseCapturingArg) -> Self::Result {
walk_precise_capturing_arg(self, arg)
}
fn visit_poly_trait_ref(&mut self, t: &'ast PolyTraitRef) -> Self::Result {
walk_poly_trait_ref(self, t)
Expand Down Expand Up @@ -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>>(
visitor: &mut V,
arg: &'a PreciseCapturingArg,
) {
) -> V::Result {
match arg {
PreciseCapturingArg::Lifetime(lt) => {
visitor.visit_lifetime(lt, LifetimeCtxt::GenericArg);
}
PreciseCapturingArg::Arg(path, id) => {
visitor.visit_path(path, *id);
}
PreciseCapturingArg::Lifetime(lt) => visitor.visit_lifetime(lt, LifetimeCtxt::GenericArg),
PreciseCapturingArg::Arg(path, id) => visitor.visit_path(path, *id),
}
}

Expand Down

0 comments on commit c12cb20

Please sign in to comment.