1
Fork 0

Use ControlFlow::is{break,continue}

This commit is contained in:
LeSeulArtichaut 2020-10-22 10:20:24 +02:00
parent 8e4cf0b3ed
commit 24e1a7e656
10 changed files with 25 additions and 25 deletions

View file

@ -74,7 +74,7 @@ where
}
let mut vis = UsedParamsNeedSubstVisitor { tcx };
if ty.visit_with(&mut vis) == ControlFlow::BREAK {
if ty.visit_with(&mut vis).is_break() {
throw_inval!(TooGeneric);
} else {
Ok(())

View file

@ -139,7 +139,7 @@ fn mark_used_by_predicates<'tcx>(
// predicate is used.
let any_param_used = {
let mut vis = HasUsedGenericParams { unused_parameters };
predicate.visit_with(&mut vis) == ControlFlow::BREAK
predicate.visit_with(&mut vis).is_break()
};
if any_param_used {