Enum rustc_lint::middle::ty::UpvarCaptureUnstable [-] [+] [src]

pub enum UpvarCapture {
    ByValue,
    ByRef(UpvarBorrow),
}

Information describing the capture of an upvar. This is computed during typeck, specifically by regionck.

Variants

ByValue

Upvar is captured by value. This is always true when the closure is labeled move, but can also be true in other cases depending on inference.

ByRef

Upvar is captured by reference.

Trait Implementations

impl tr for UpvarCapture

fn tr(&self, dcx: &DecodeContext) -> UpvarCapture

impl<'tcx> Repr<'tcx> for UpvarCapture

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

Derived Implementations

impl Copy for UpvarCapture

impl Debug for UpvarCapture

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl Decodable for UpvarCapture

fn decode<__D>(__arg_0: &mut __D) -> Result<UpvarCapture, __D::Error> where __D: Decoder

impl Encodable for UpvarCapture

fn encode<__S>(&self, __arg_0: &mut __S) -> Result<(), __S::Error> where __S: Encoder

impl Clone for UpvarCapture

fn clone(&self) -> UpvarCapture

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

impl PartialEq<UpvarCapture> for UpvarCapture

fn eq(&self, __arg_0: &UpvarCapture) -> bool

fn ne(&self, __arg_0: &UpvarCapture) -> bool