Rename TypeFolderFallible to FallibleTypeFolder
This commit is contained in:
parent
d79e17daf0
commit
cf683e644f
12 changed files with 68 additions and 68 deletions
|
@ -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...
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue