pub struct NeedsDrop;
Expand description

Constant containing an ADT that implements Drop. This must be ruled out because implicit promotion would remove side-effects that occur as part of dropping that value. N.B., the implicit promotion has to reject const Drop implementations because even if side-effects are ruled out through other means, the execution of the drop could diverge.

Trait Implementations§

source§

impl Qualif for NeedsDrop

source§

const ANALYSIS_NAME: &'static str = "flow_needs_drop"

The name of the file used to debug the dataflow analysis that computes this qualif.
source§

const IS_CLEARED_ON_MOVE: bool = true

Whether this Qualif is cleared when a local is moved from.
source§

fn in_qualifs(qualifs: &ConstQualifs) -> bool

Extracts the field of ConstQualifs that corresponds to this Qualif.
source§

fn in_any_value_of_ty<'tcx>(cx: &ConstCx<'_, 'tcx>, ty: Ty<'tcx>) -> bool

Returns true if any value of the given type could possibly have this Qualif. Read more
source§

fn in_adt_inherently<'tcx>( cx: &ConstCx<'_, 'tcx>, adt: AdtDef<'tcx>, _: GenericArgsRef<'tcx> ) -> bool

Returns true if this Qualif is inherent to the given struct or enum. Read more
source§

const ALLOW_PROMOTED: bool = false

Whether this Qualif might be evaluated after the promotion and can encounter a promoted.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 0 bytes