[−][src]Struct rustc_middle::ty::print::FmtPrinter
Implementations
impl<F, 'a, 'tcx> FmtPrinter<'a, 'tcx, F>[src]
impl<F: Write, '_, '_> FmtPrinter<'_, '_, F>[src]
pub fn pretty_print_region(self, region: Region<'_>) -> Result<Self, Error>[src]
impl<F: Write, '_, 'tcx> FmtPrinter<'_, 'tcx, F>[src]
pub fn name_all_regions<T>(
self,
value: &Binder<T>
) -> Result<(Self, (T, BTreeMap<BoundRegion, Region<'tcx>>)), Error> where
T: Print<'tcx, Self, Output = Self, Error = Error> + TypeFoldable<'tcx>, [src]
self,
value: &Binder<T>
) -> Result<(Self, (T, BTreeMap<BoundRegion, Region<'tcx>>)), Error> where
T: Print<'tcx, Self, Output = Self, Error = Error> + TypeFoldable<'tcx>,
pub fn pretty_in_binder<T>(self, value: &Binder<T>) -> Result<Self, Error> where
T: Print<'tcx, Self, Output = Self, Error = Error> + TypeFoldable<'tcx>, [src]
T: Print<'tcx, Self, Output = Self, Error = Error> + TypeFoldable<'tcx>,
pub(in ty::print::pretty) fn prepare_late_bound_region_info<T>(
&mut self,
value: &Binder<T>
) where
T: TypeFoldable<'tcx>, [src]
&mut self,
value: &Binder<T>
) where
T: TypeFoldable<'tcx>,
Trait Implementations
impl<F, 'a, 'tcx> Deref for FmtPrinter<'a, 'tcx, F>[src]
type Target = FmtPrinterData<'a, 'tcx, F>
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target[src]
impl<F, '_, '_> DerefMut for FmtPrinter<'_, '_, F>[src]
impl<F: Write, 'tcx, '_> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx, F>[src]
pub fn infer_ty_name(&self, id: TyVid) -> Option<String>[src]
pub fn print_value_path(
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>[src]
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>
pub fn in_binder<T>(self, value: &Binder<T>) -> Result<Self, Self::Error> where
T: Print<'tcx, Self, Output = Self, Error = Self::Error> + TypeFoldable<'tcx>, [src]
T: Print<'tcx, Self, Output = Self, Error = Self::Error> + TypeFoldable<'tcx>,
pub fn typed_value(
self,
f: impl FnOnce(Self) -> Result<Self, Self::Error>,
t: impl FnOnce(Self) -> Result<Self, Self::Error>,
conversion: &str
) -> Result<Self::Const, Self::Error>[src]
self,
f: impl FnOnce(Self) -> Result<Self, Self::Error>,
t: impl FnOnce(Self) -> Result<Self, Self::Error>,
conversion: &str
) -> Result<Self::Const, Self::Error>
pub fn generic_delimiters(
self,
f: impl FnOnce(Self) -> Result<Self, Self::Error>
) -> Result<Self, Self::Error>[src]
self,
f: impl FnOnce(Self) -> Result<Self, Self::Error>
) -> Result<Self, Self::Error>
pub fn region_should_not_be_omitted(&self, region: Region<'_>) -> bool[src]
pub fn pretty_print_const_pointer(
self,
p: Pointer,
ty: Ty<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>[src]
self,
p: Pointer,
ty: Ty<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>
pub fn comma_sep<T>(
self,
elems: impl Iterator<Item = T>
) -> Result<Self, Self::Error> where
T: Print<'tcx, Self, Output = Self, Error = Self::Error>, [src]
self,
elems: impl Iterator<Item = T>
) -> Result<Self, Self::Error> where
T: Print<'tcx, Self, Output = Self, Error = Self::Error>,
pub fn try_print_visible_def_path(
self,
def_id: DefId
) -> Result<(Self, bool), Self::Error>[src]
self,
def_id: DefId
) -> Result<(Self, bool), Self::Error>
pub fn try_print_trimmed_def_path(
self,
def_id: DefId
) -> Result<(Self::Path, bool), Self::Error>[src]
self,
def_id: DefId
) -> Result<(Self::Path, bool), Self::Error>
pub fn try_print_visible_def_path_recur(
self,
def_id: DefId,
callers: &mut Vec<DefId>
) -> Result<(Self, bool), Self::Error>[src]
self,
def_id: DefId,
callers: &mut Vec<DefId>
) -> Result<(Self, bool), Self::Error>
pub fn pretty_path_qualified(
self,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn pretty_path_append_impl(
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn pretty_print_type(self, ty: Ty<'tcx>) -> Result<Self::Type, Self::Error>[src]
pub fn pretty_print_bound_var(
&mut self,
debruijn: DebruijnIndex,
var: BoundVar
) -> Result<(), Self::Error>[src]
&mut self,
debruijn: DebruijnIndex,
var: BoundVar
) -> Result<(), Self::Error>
pub fn pretty_print_dyn_existential(
self,
predicates: &'tcx List<ExistentialPredicate<'tcx>>
) -> Result<Self::DynExistential, Self::Error>[src]
self,
predicates: &'tcx List<ExistentialPredicate<'tcx>>
) -> Result<Self::DynExistential, Self::Error>
pub fn pretty_fn_sig(
self,
inputs: &[Ty<'tcx>],
c_variadic: bool,
output: Ty<'tcx>
) -> Result<Self, Self::Error>[src]
self,
inputs: &[Ty<'tcx>],
c_variadic: bool,
output: Ty<'tcx>
) -> Result<Self, Self::Error>
pub fn pretty_print_const(
self,
ct: &'tcx Const<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>[src]
self,
ct: &'tcx Const<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>
pub fn pretty_print_const_scalar(
self,
scalar: Scalar,
ty: Ty<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>[src]
self,
scalar: Scalar,
ty: Ty<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>
pub fn pretty_print_byte_str(
self,
byte_str: &'tcx [u8]
) -> Result<Self::Const, Self::Error>[src]
self,
byte_str: &'tcx [u8]
) -> Result<Self::Const, Self::Error>
pub fn pretty_print_const_value(
self,
ct: ConstValue<'tcx>,
ty: Ty<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>[src]
self,
ct: ConstValue<'tcx>,
ty: Ty<'tcx>,
print_ty: bool
) -> Result<Self::Const, Self::Error>
impl<F: Write, 'tcx, '_> Printer<'tcx> for FmtPrinter<'_, 'tcx, F>[src]
type Error = Error
type Path = Self
type Region = Self
type Type = Self
type DynExistential = Self
type Const = Self
pub fn tcx<'a>(&'a self) -> TyCtxt<'tcx>[src]
pub fn print_def_path(
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>[src]
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>
pub fn print_region(
self,
region: Region<'_>
) -> Result<Self::Region, Self::Error>[src]
self,
region: Region<'_>
) -> Result<Self::Region, Self::Error>
pub fn print_type(self, ty: Ty<'tcx>) -> Result<Self::Type, Self::Error>[src]
pub fn print_dyn_existential(
self,
predicates: &'tcx List<ExistentialPredicate<'tcx>>
) -> Result<Self::DynExistential, Self::Error>[src]
self,
predicates: &'tcx List<ExistentialPredicate<'tcx>>
) -> Result<Self::DynExistential, Self::Error>
pub fn print_const(
self,
ct: &'tcx Const<'tcx>
) -> Result<Self::Const, Self::Error>[src]
self,
ct: &'tcx Const<'tcx>
) -> Result<Self::Const, Self::Error>
pub fn path_crate(self, cnum: CrateNum) -> Result<Self::Path, Self::Error>[src]
pub fn path_qualified(
self,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn path_append_impl(
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
_disambiguated_data: &DisambiguatedDefPathData,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
_disambiguated_data: &DisambiguatedDefPathData,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn path_append(
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
disambiguated_data: &DisambiguatedDefPathData
) -> Result<Self::Path, Self::Error>[src]
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
disambiguated_data: &DisambiguatedDefPathData
) -> Result<Self::Path, Self::Error>
pub fn path_generic_args(
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
args: &[GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>[src]
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
args: &[GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>
pub fn print_impl_path(
self,
impl_def_id: DefId,
substs: &'tcx [GenericArg<'tcx>],
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
impl_def_id: DefId,
substs: &'tcx [GenericArg<'tcx>],
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn default_print_def_path(
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>[src]
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>
pub fn generic_args_to_print(
&self,
generics: &'tcx Generics,
substs: &'tcx [GenericArg<'tcx>]
) -> &'tcx [GenericArg<'tcx>][src]
&self,
generics: &'tcx Generics,
substs: &'tcx [GenericArg<'tcx>]
) -> &'tcx [GenericArg<'tcx>]
pub fn default_print_impl_path(
self,
impl_def_id: DefId,
_substs: &'tcx [GenericArg<'tcx>],
self_ty: Ty<'tcx>,
impl_trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
impl_def_id: DefId,
_substs: &'tcx [GenericArg<'tcx>],
self_ty: Ty<'tcx>,
impl_trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
impl<F: Write, '_, '_> Write for FmtPrinter<'_, '_, F>[src]
Auto Trait Implementations
impl<'a, 'tcx, F> !RefUnwindSafe for FmtPrinter<'a, 'tcx, F>
impl<'a, 'tcx, F> !Send for FmtPrinter<'a, 'tcx, F>
impl<'a, 'tcx, F> !Sync for FmtPrinter<'a, 'tcx, F>
impl<'a, 'tcx, F> Unpin for FmtPrinter<'a, 'tcx, F>
impl<'a, 'tcx, F> !UnwindSafe for FmtPrinter<'a, 'tcx, F>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MaybeResult<T> for T[src]
type Error = !
pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]
pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.