Struct rustc::ty::ExistentialTraitRef
[−]
[src]
pub struct ExistentialTraitRef<'tcx> { pub def_id: DefId, pub substs: &'tcx Substs<'tcx>, }
rustc_private
)An existential reference to a trait, where Self
is erased.
For example, the trait object Trait<'a, 'b, X, Y>
is:
exists T. T: Trait<'a, 'b, X, Y>
The substitutions don't include the erased Self
, only trait
type and lifetime parameters ([X, Y]
and ['a, 'b]
above).
Fields
def_id: DefId
rustc_private
)substs: &'tcx Substs<'tcx>
rustc_private
)Methods
impl<'a, 'gcx, 'tcx> ExistentialTraitRef<'tcx>
[src]
fn erase_self_ty(tcx: TyCtxt<'a, 'gcx, 'tcx>,
trait_ref: TraitRef<'tcx>)
-> ExistentialTraitRef<'tcx>
trait_ref: TraitRef<'tcx>)
-> ExistentialTraitRef<'tcx>
rustc_private
)impl<'a, 'gcx, 'tcx> ExistentialTraitRef<'tcx>
[src]
fn input_types<'b>(&'b self) -> impl DoubleEndedIterator<Item=Ty<'tcx>> + 'b
rustc_private
)fn with_self_ty(&self,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
self_ty: Ty<'tcx>)
-> TraitRef<'tcx>
tcx: TyCtxt<'a, 'gcx, 'tcx>,
self_ty: Ty<'tcx>)
-> TraitRef<'tcx>
rustc_private
)Object types don't have a self-type specified. Therefore, when
we convert the principal trait-ref into a normal trait-ref,
you must give some self-type. A common choice is mk_err()
or some skolemized type.
Trait Implementations
impl<'gcx> TransNormalize<'gcx> for ExistentialTraitRef<'gcx>
[src]
fn trans_normalize<'a, 'tcx>(&self, infcx: &InferCtxt<'a, 'gcx, 'tcx>) -> Self
rustc_private
)impl<'tcx> Relate<'tcx> for ExistentialTraitRef<'tcx>
[src]
fn relate<'a, 'gcx, R>(relation: &mut R,
a: &ExistentialTraitRef<'tcx>,
b: &ExistentialTraitRef<'tcx>)
-> RelateResult<'tcx, ExistentialTraitRef<'tcx>> where R: TypeRelation<'a, 'gcx, 'tcx>, 'gcx: 'a + 'tcx, 'tcx: 'a
a: &ExistentialTraitRef<'tcx>,
b: &ExistentialTraitRef<'tcx>)
-> RelateResult<'tcx, ExistentialTraitRef<'tcx>> where R: TypeRelation<'a, 'gcx, 'tcx>, 'gcx: 'a + 'tcx, 'tcx: 'a
rustc_private
)impl<'a, 'tcx> Lift<'tcx> for ExistentialTraitRef<'a>
[src]
type Lifted = ExistentialTraitRef<'tcx>
rustc_private
)fn lift_to_tcx<'b, 'gcx>(&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>)
-> Option<Self::Lifted>
tcx: TyCtxt<'b, 'gcx, 'tcx>)
-> Option<Self::Lifted>
rustc_private
)impl<'tcx> TypeFoldable<'tcx> for ExistentialTraitRef<'tcx>
[src]
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
rustc_private
)fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
rustc_private
)fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
rustc_private
)fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
rustc_private
)fn has_regions_escaping_depth(&self, depth: u32) -> bool
rustc_private
)fn has_escaping_regions(&self) -> bool
rustc_private
)fn has_type_flags(&self, flags: TypeFlags) -> bool
rustc_private
)fn has_projection_types(&self) -> bool
rustc_private
)fn references_error(&self) -> bool
rustc_private
)fn has_param_types(&self) -> bool
rustc_private
)fn has_self_ty(&self) -> bool
rustc_private
)fn has_infer_types(&self) -> bool
rustc_private
)fn needs_infer(&self) -> bool
rustc_private
)fn needs_subst(&self) -> bool
rustc_private
)fn has_re_skol(&self) -> bool
rustc_private
)fn has_closure_types(&self) -> bool
rustc_private
)fn has_erasable_regions(&self) -> bool
rustc_private
)fn is_normalized_for_trans(&self) -> bool
rustc_private
)fn is_global(&self) -> bool
rustc_private
)Indicates whether this value references only 'global' types/lifetimes that are the same regardless of what fn we are in. This is used for caching. Errs on the side of returning false. Read more
impl<'tcx> Copy for ExistentialTraitRef<'tcx>
[src]
impl<'tcx> Clone for ExistentialTraitRef<'tcx>
[src]
fn clone(&self) -> ExistentialTraitRef<'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'tcx> PartialEq for ExistentialTraitRef<'tcx>
[src]
fn eq(&self, __arg_0: &ExistentialTraitRef<'tcx>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ExistentialTraitRef<'tcx>) -> bool
This method tests for !=
.
impl<'tcx> Eq for ExistentialTraitRef<'tcx>
[src]
impl<'tcx> Hash for ExistentialTraitRef<'tcx>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<'tcx> Encodable for ExistentialTraitRef<'tcx>
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
deprecated in favor of rustc-serialize on crates.io
impl<'tcx> Decodable for ExistentialTraitRef<'tcx>
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D)
-> Result<ExistentialTraitRef<'tcx>, __D::Error>
-> Result<ExistentialTraitRef<'tcx>, __D::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
deprecated in favor of rustc-serialize on crates.io