Skip to content

Commit 9433eb8

Browse files
Remove implicit Continue type
1 parent 24e1a7e commit 9433eb8

File tree

30 files changed

+129
-135
lines changed

30 files changed

+129
-135
lines changed

Diff for: compiler/rustc_infer/src/infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
14981498
}
14991499

15001500
impl<'tcx> ty::fold::TypeVisitor<'tcx> for OpaqueTypesVisitor<'tcx> {
1501-
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<(), ()> {
1501+
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<()> {
15021502
if let Some((kind, def_id)) = TyCategory::from_ty(t) {
15031503
let span = self.tcx.def_span(def_id);
15041504
// Avoid cluttering the output when the "found" and error span overlap:

Diff for: compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
474474
struct TraitObjectVisitor(Vec<DefId>);
475475

476476
impl TypeVisitor<'_> for TraitObjectVisitor {
477-
fn visit_ty(&mut self, t: Ty<'_>) -> ControlFlow<(), ()> {
477+
fn visit_ty(&mut self, t: Ty<'_>) -> ControlFlow<()> {
478478
match t.kind() {
479479
ty::Dynamic(preds, RegionKind::ReStatic) => {
480480
if let Some(def_id) = preds.principal_def_id() {

Diff for: compiler/rustc_infer/src/infer/nll_relate/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -741,15 +741,15 @@ struct ScopeInstantiator<'me, 'tcx> {
741741
}
742742

743743
impl<'me, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'me, 'tcx> {
744-
fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &ty::Binder<T>) -> ControlFlow<(), ()> {
744+
fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &ty::Binder<T>) -> ControlFlow<()> {
745745
self.target_index.shift_in(1);
746746
t.super_visit_with(self);
747747
self.target_index.shift_out(1);
748748

749749
ControlFlow::CONTINUE
750750
}
751751

752-
fn visit_region(&mut self, r: ty::Region<'tcx>) -> ControlFlow<(), ()> {
752+
fn visit_region(&mut self, r: ty::Region<'tcx>) -> ControlFlow<()> {
753753
let ScopeInstantiator { bound_region_scope, next_region, .. } = self;
754754

755755
match r {

Diff for: compiler/rustc_infer/src/infer/resolve.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl<'a, 'tcx> UnresolvedTypeFinder<'a, 'tcx> {
123123
}
124124

125125
impl<'a, 'tcx> TypeVisitor<'tcx> for UnresolvedTypeFinder<'a, 'tcx> {
126-
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<(), ()> {
126+
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<()> {
127127
let t = self.infcx.shallow_resolve(t);
128128
if t.has_infer_types() {
129129
if let ty::Infer(infer_ty) = *t.kind() {

Diff for: compiler/rustc_infer/src/traits/structural_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for traits::Obligation<'tcx
6969
}
7070
}
7171

72-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
72+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
7373
self.predicate.visit_with(visitor)
7474
}
7575
}

Diff for: compiler/rustc_lint/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
11361136
};
11371137

11381138
impl<'a, 'tcx> ty::fold::TypeVisitor<'tcx> for ProhibitOpaqueTypes<'a, 'tcx> {
1139-
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<(), ()> {
1139+
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<()> {
11401140
match ty.kind() {
11411141
ty::Opaque(..) => {
11421142
self.ty = Some(ty);

Diff for: compiler/rustc_macros/src/type_foldable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn type_foldable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::
3636
fn super_visit_with<__F: ::rustc_middle::ty::fold::TypeVisitor<'tcx>>(
3737
&self,
3838
__folder: &mut __F
39-
) -> ::std::ops::ControlFlow<(), ()> {
39+
) -> ::std::ops::ControlFlow<()> {
4040
match *self { #body_visit }
4141
::std::ops::ControlFlow::CONTINUE
4242
}

Diff for: compiler/rustc_middle/src/macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ macro_rules! CloneTypeFoldableImpls {
6262
fn super_visit_with<F: $crate::ty::fold::TypeVisitor<$tcx>>(
6363
&self,
6464
_: &mut F)
65-
-> ::std::ops::ControlFlow<(), ()>
65+
-> ::std::ops::ControlFlow<()>
6666
{
6767
::std::ops::ControlFlow::CONTINUE
6868
}
@@ -105,7 +105,7 @@ macro_rules! EnumTypeFoldableImpl {
105105
fn super_visit_with<V: $crate::ty::fold::TypeVisitor<$tcx>>(
106106
&self,
107107
visitor: &mut V,
108-
) -> ::std::ops::ControlFlow<(), ()> {
108+
) -> ::std::ops::ControlFlow<()> {
109109
EnumTypeFoldableImpl!(@VisitVariants(self, visitor) input($($variants)*) output())
110110
}
111111
}

Diff for: compiler/rustc_middle/src/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ impl<'tcx> TypeFoldable<'tcx> for UserTypeProjection {
24892489
UserTypeProjection { base, projs }
24902490
}
24912491

2492-
fn super_visit_with<Vs: TypeVisitor<'tcx>>(&self, visitor: &mut Vs) -> ControlFlow<(), ()> {
2492+
fn super_visit_with<Vs: TypeVisitor<'tcx>>(&self, visitor: &mut Vs) -> ControlFlow<()> {
24932493
self.base.visit_with(visitor)
24942494
// Note: there's nothing in `self.proj` to visit.
24952495
}

Diff for: compiler/rustc_middle/src/mir/type_foldable.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
8787
Terminator { source_info: self.source_info, kind }
8888
}
8989

90-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
90+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
9191
use crate::mir::TerminatorKind::*;
9292

9393
match self.kind {
@@ -147,7 +147,7 @@ impl<'tcx> TypeFoldable<'tcx> for GeneratorKind {
147147
*self
148148
}
149149

150-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<(), ()> {
150+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<()> {
151151
ControlFlow::CONTINUE
152152
}
153153
}
@@ -157,7 +157,7 @@ impl<'tcx> TypeFoldable<'tcx> for Place<'tcx> {
157157
Place { local: self.local.fold_with(folder), projection: self.projection.fold_with(folder) }
158158
}
159159

160-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
160+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
161161
self.local.visit_with(visitor)?;
162162
self.projection.visit_with(visitor)
163163
}
@@ -169,7 +169,7 @@ impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<PlaceElem<'tcx>> {
169169
folder.tcx().intern_place_elems(&v)
170170
}
171171

172-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
172+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
173173
self.iter().try_for_each(|t| t.visit_with(visitor))
174174
}
175175
}
@@ -219,7 +219,7 @@ impl<'tcx> TypeFoldable<'tcx> for Rvalue<'tcx> {
219219
}
220220
}
221221

222-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
222+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
223223
use crate::mir::Rvalue::*;
224224
match *self {
225225
Use(ref op) => op.visit_with(visitor),
@@ -274,7 +274,7 @@ impl<'tcx> TypeFoldable<'tcx> for Operand<'tcx> {
274274
}
275275
}
276276

277-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
277+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
278278
match *self {
279279
Operand::Copy(ref place) | Operand::Move(ref place) => place.visit_with(visitor),
280280
Operand::Constant(ref c) => c.visit_with(visitor),
@@ -298,7 +298,7 @@ impl<'tcx> TypeFoldable<'tcx> for PlaceElem<'tcx> {
298298
}
299299
}
300300

301-
fn super_visit_with<Vs: TypeVisitor<'tcx>>(&self, visitor: &mut Vs) -> ControlFlow<(), ()> {
301+
fn super_visit_with<Vs: TypeVisitor<'tcx>>(&self, visitor: &mut Vs) -> ControlFlow<()> {
302302
use crate::mir::ProjectionElem::*;
303303

304304
match self {
@@ -313,7 +313,7 @@ impl<'tcx> TypeFoldable<'tcx> for Field {
313313
fn super_fold_with<F: TypeFolder<'tcx>>(&self, _: &mut F) -> Self {
314314
*self
315315
}
316-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<(), ()> {
316+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<()> {
317317
ControlFlow::CONTINUE
318318
}
319319
}
@@ -322,7 +322,7 @@ impl<'tcx> TypeFoldable<'tcx> for GeneratorSavedLocal {
322322
fn super_fold_with<F: TypeFolder<'tcx>>(&self, _: &mut F) -> Self {
323323
*self
324324
}
325-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<(), ()> {
325+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<()> {
326326
ControlFlow::CONTINUE
327327
}
328328
}
@@ -331,7 +331,7 @@ impl<'tcx, R: Idx, C: Idx> TypeFoldable<'tcx> for BitMatrix<R, C> {
331331
fn super_fold_with<F: TypeFolder<'tcx>>(&self, _: &mut F) -> Self {
332332
self.clone()
333333
}
334-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<(), ()> {
334+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, _: &mut V) -> ControlFlow<()> {
335335
ControlFlow::CONTINUE
336336
}
337337
}
@@ -344,7 +344,7 @@ impl<'tcx> TypeFoldable<'tcx> for Constant<'tcx> {
344344
literal: self.literal.fold_with(folder),
345345
}
346346
}
347-
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
347+
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
348348
self.literal.visit_with(visitor)
349349
}
350350
}

0 commit comments

Comments
 (0)