Use ControlFlow::is{break,continue}
This commit is contained in:
@@ -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(())
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user