Use ControlFlow::is{break,continue}
This commit is contained in:
parent
8e4cf0b3ed
commit
24e1a7e656
10 changed files with 25 additions and 25 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue