Skip to content

Commit 9fde49b

Browse files
committed
Change visit_precise_capturing_arg so it returns a Self::Result
1 parent 6295686 commit 9fde49b

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

‎compiler/rustc_ast/src/visit.rs‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ pub trait Visitor<'ast>: Sized {
200200
fnvisit_param_bound(&mutself,bounds:&'astGenericBound,_ctxt:BoundKind) -> Self::Result{
201201
walk_param_bound(self, bounds)
202202
}
203-
fnvisit_precise_capturing_arg(&mutself,arg:&'astPreciseCapturingArg){
204-
walk_precise_capturing_arg(self, arg);
203+
fnvisit_precise_capturing_arg(&mutself,arg:&'astPreciseCapturingArg)-> Self::Result{
204+
walk_precise_capturing_arg(self, arg)
205205
}
206206
fnvisit_poly_trait_ref(&mutself,t:&'astPolyTraitRef) -> 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
pubfnwalk_precise_capturing_arg<'a,V:Visitor<'a>>(
731731
visitor:&mutV,
732732
arg:&'aPreciseCapturingArg,
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)