Struct rustc_lint::middle::ty::TransmuteRestrictionUnstable [-] [+] [src]

pub struct TransmuteRestriction<'tcx> {
    pub span: Span,
    pub original_from: &'tcx TyS<'tcx>,
    pub original_to: &'tcx TyS<'tcx>,
    pub substituted_from: &'tcx TyS<'tcx>,
    pub substituted_to: &'tcx TyS<'tcx>,
    pub id: u32,
}

A restriction that certain types must be the same size. The use of transmute gives rise to these restrictions. These generally cannot be checked until trans; therefore, each call to transmute will push one or more such restriction into the transmute_restrictions vector during intrinsicck. They are then checked during trans by the fn check_intrinsics.

Fields

span

The span whence the restriction comes.

original_from

The type being transmuted from.

original_to

The type being transmuted to.

substituted_from

The type being transmuted from, with all type parameters substituted for an arbitrary representative. Not to be shown to the end user.

substituted_to

The type being transmuted to, with all type parameters substituted for an arbitrary representative. Not to be shown to the end user.

id

NodeId of the transmute intrinsic.

Trait Implementations

impl<'tcx> Repr<'tcx> for TransmuteRestriction<'tcx>

fn repr(&self, tcx: &ctxt<'tcx>) -> String

Derived Implementations

impl<'tcx> Clone for TransmuteRestriction<'tcx>

fn clone(&self) -> TransmuteRestriction<'tcx>

fn clone_from(&mut self, source: &Self)

impl<'tcx> Copy for TransmuteRestriction<'tcx>