1
Fork 0

Rename TypeFolderFallible to FallibleTypeFolder

This commit is contained in:
Alan Egerton 2021-12-01 15:11:24 +00:00
parent d79e17daf0
commit cf683e644f
No known key found for this signature in database
GPG key ID: 07CAC3CCA7E0643F
12 changed files with 68 additions and 68 deletions

View file

@ -1,7 +1,7 @@
use super::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use super::{FixupError, FixupResult, InferCtxt, Span};
use rustc_middle::mir;
use rustc_middle::ty::fold::{TypeFolder, TypeFolderFallible, TypeVisitor};
use rustc_middle::ty::fold::{FallibleTypeFolder, TypeFolder, TypeVisitor};
use rustc_middle::ty::{self, Const, InferConst, Ty, TyCtxt, TypeFoldable};
use std::ops::ControlFlow;
@ -192,7 +192,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for FullTypeResolver<'a, 'tcx> {
}
}
impl<'a, 'tcx> TypeFolderFallible<'tcx> for FullTypeResolver<'a, 'tcx> {
impl<'a, 'tcx> FallibleTypeFolder<'tcx> for FullTypeResolver<'a, 'tcx> {
fn try_fold_ty(&mut self, t: Ty<'tcx>) -> Result<Ty<'tcx>, Self::Error> {
if !t.needs_infer() {
Ok(t) // micro-optimize -- if there is nothing in this type that this fold affects...

View file

@ -1,7 +1,7 @@
use crate::traits;
use crate::traits::project::Normalized;
use rustc_middle::ty;
use rustc_middle::ty::fold::{TypeFoldable, TypeFolderFallible, TypeVisitor};
use rustc_middle::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeVisitor};
use std::fmt;
use std::ops::ControlFlow;
@ -60,7 +60,7 @@ impl<'tcx> fmt::Debug for traits::MismatchedProjectionTypes<'tcx> {
// TypeFoldable implementations.
impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for traits::Obligation<'tcx, O> {
fn try_super_fold_with<F: TypeFolderFallible<'tcx>>(
fn try_super_fold_with<F: FallibleTypeFolder<'tcx>>(
self,
folder: &mut F,
) -> Result<Self, F::Error> {