diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-10-22 10:20:24 +0200 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-10-30 12:27:46 +0100 |
| commit | 24e1a7e6564edaf237a653bec147934d38cfac48 (patch) | |
| tree | 9b0d5042334ab12d34d480395109ecdf62f9f88a /compiler/rustc_mir/src | |
| parent | 8e4cf0b3ed1a7c83f40dfc717ed2fc03a630a1d4 (diff) | |
| download | rust-24e1a7e6564edaf237a653bec147934d38cfac48.tar.gz rust-24e1a7e6564edaf237a653bec147934d38cfac48.zip | |
Use `ControlFlow::is{break,continue}`
Diffstat (limited to 'compiler/rustc_mir/src')
| -rw-r--r-- | compiler/rustc_mir/src/interpret/util.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir/src/monomorphize/polymorphize.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir/src/interpret/util.rs b/compiler/rustc_mir/src/interpret/util.rs index 4c52f8eeaff..987efdf49c1 100644 --- a/compiler/rustc_mir/src/interpret/util.rs +++ b/compiler/rustc_mir/src/interpret/util.rs @@ -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(()) diff --git a/compiler/rustc_mir/src/monomorphize/polymorphize.rs b/compiler/rustc_mir/src/monomorphize/polymorphize.rs index 5eb60a550de..4cf01ce3b88 100644 --- a/compiler/rustc_mir/src/monomorphize/polymorphize.rs +++ b/compiler/rustc_mir/src/monomorphize/polymorphize.rs @@ -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 { |
