diff options
| author | bors <bors@rust-lang.org> | 2023-01-19 02:09:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-19 02:09:45 +0000 |
| commit | 6ba6d22bdf5348e566dedc77a7dfee3f3804f2fb (patch) | |
| tree | a692060b061247109fb5a7302e39fc0b30c3dd9d /compiler/rustc_monomorphize/src/polymorphize.rs | |
| parent | 8b11574ca07f95dd33861d145a43708c20cb4eb5 (diff) | |
| parent | e12c6b277fab3aa401d38b89b0b3ec8fc96c8bde (diff) | |
| download | rust-6ba6d22bdf5348e566dedc77a7dfee3f3804f2fb.tar.gz rust-6ba6d22bdf5348e566dedc77a7dfee3f3804f2fb.zip | |
Auto merge of #107052 - compiler-errors:rollup-vxr22g5, r=compiler-errors
Rollup of 8 pull requests Successful merges: - #105796 (rustdoc: simplify JS search routine by not messing with lev distance) - #106753 (Make sure that RPITITs are not considered suggestable) - #106917 (Encode const mir for closures if they're const) - #107004 (Implement some candidates for the new solver (redux)) - #107023 (Stop using `BREAK` & `CONTINUE` in compiler) - #107030 (Correct typo) - #107042 (rustdoc: fix corner cases with "?" JS keyboard command) - #107045 (rustdoc: remove redundant CSS rule `#settings .setting-line`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_monomorphize/src/polymorphize.rs')
| -rw-r--r-- | compiler/rustc_monomorphize/src/polymorphize.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_monomorphize/src/polymorphize.rs b/compiler/rustc_monomorphize/src/polymorphize.rs index c8fc69eb856..cf13d4584a1 100644 --- a/compiler/rustc_monomorphize/src/polymorphize.rs +++ b/compiler/rustc_monomorphize/src/polymorphize.rs @@ -300,20 +300,20 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> { #[instrument(level = "debug", skip(self))] fn visit_const(&mut self, c: Const<'tcx>) -> ControlFlow<Self::BreakTy> { if !c.has_non_region_param() { - return ControlFlow::CONTINUE; + return ControlFlow::Continue(()); } match c.kind() { ty::ConstKind::Param(param) => { debug!(?param); self.unused_parameters.mark_used(param.index); - ControlFlow::CONTINUE + ControlFlow::Continue(()) } ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, substs }) if matches!(self.tcx.def_kind(def.did), DefKind::AnonConst) => { self.visit_child_body(def.did, substs); - ControlFlow::CONTINUE + ControlFlow::Continue(()) } _ => c.super_visit_with(self), } @@ -322,7 +322,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> { #[instrument(level = "debug", skip(self))] fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { if !ty.has_non_region_param() { - return ControlFlow::CONTINUE; + return ControlFlow::Continue(()); } match *ty.kind() { @@ -330,18 +330,18 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> { debug!(?def_id); // Avoid cycle errors with generators. if def_id == self.def_id { - return ControlFlow::CONTINUE; + return ControlFlow::Continue(()); } // Consider any generic parameters used by any closures/generators as used in the // parent. self.visit_child_body(def_id, substs); - ControlFlow::CONTINUE + ControlFlow::Continue(()) } ty::Param(param) => { debug!(?param); self.unused_parameters.mark_used(param.index); - ControlFlow::CONTINUE + ControlFlow::Continue(()) } _ => ty.super_visit_with(self), } |
