Remove implicit Continue type

This commit is contained in:
LeSeulArtichaut 2020-10-25 11:50:56 +01:00
parent 24e1a7e656
commit 9433eb83fe
30 changed files with 129 additions and 135 deletions

View file

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

View file

@ -474,7 +474,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
struct TraitObjectVisitor(Vec<DefId>);
impl TypeVisitor<'_> for TraitObjectVisitor {
fn visit_ty(&mut self, t: Ty<'_>) -> ControlFlow<(), ()> {
fn visit_ty(&mut self, t: Ty<'_>) -> ControlFlow<()> {
match t.kind() {
ty::Dynamic(preds, RegionKind::ReStatic) => {
if let Some(def_id) = preds.principal_def_id() {

View file

@ -741,7 +741,7 @@ struct ScopeInstantiator<'me, 'tcx> {
}
impl<'me, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'me, 'tcx> {
fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &ty::Binder<T>) -> ControlFlow<(), ()> {
fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &ty::Binder<T>) -> ControlFlow<()> {
self.target_index.shift_in(1);
t.super_visit_with(self);
self.target_index.shift_out(1);
@ -749,7 +749,7 @@ impl<'me, 'tcx> TypeVisitor<'tcx> for ScopeInstantiator<'me, 'tcx> {
ControlFlow::CONTINUE
}
fn visit_region(&mut self, r: ty::Region<'tcx>) -> ControlFlow<(), ()> {
fn visit_region(&mut self, r: ty::Region<'tcx>) -> ControlFlow<()> {
let ScopeInstantiator { bound_region_scope, next_region, .. } = self;
match r {

View file

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

View file

@ -69,7 +69,7 @@ impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for traits::Obligation<'tcx
}
}
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<()> {
self.predicate.visit_with(visitor)
}
}