Enum rustc::middle::region::CodeExtentExperimental [-]  [+] [src]

pub enum CodeExtent {
    Misc(NodeId),
}

CodeExtent represents a statically-describable extent that can be used to bound the lifetime/region for values.

FIXME (pnkfelix): This currently derives PartialOrd and Ord to placate the same deriving in ty::FreeRegion, but we may want to actually attach a more meaningful ordering to scopes than the one generated via deriving here.

Variants

Misc

Methods

impl CodeExtent

fn from_node_id(node_id: NodeId) -> CodeExtent

Creates a scope that represents the dynamic extent associated with node_id.

fn node_id(&self) -> NodeId

Returns a node id associated with this scope.

NB: likely to be replaced as API is refined; e.g. pnkfelix anticipates fn entry_node_id and fn each_exit_node_id.

fn map_id<F>(&self, f_id: F) -> CodeExtent where F: FnOnce(NodeId) -> NodeId

Maps this scope to a potentially new one according to the NodeId transformer f_id.

Trait Implementations

Derived Implementations

impl Copy for CodeExtent

impl Show for CodeExtent

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

impl<__D: Decoder<__E>, __E> Decodable<__D, __E> for CodeExtent

fn decode(__arg_0: &mut __D) -> Result<CodeExtent, __E>

impl<__S: Encoder<__E>, __E> Encodable<__S, __E> for CodeExtent

fn encode(&self, __arg_0: &mut __S) -> Result<(), __E>

impl<__S: Writer> Hash<__S> for CodeExtent

fn hash(&self, __arg_0: &mut __S)

impl Ord for CodeExtent

fn cmp(&self, __arg_0: &CodeExtent) -> Ordering

impl Eq for CodeExtent

fn assert_receiver_is_total_eq(&self)

impl PartialOrd for CodeExtent

fn partial_cmp(&self, __arg_0: &CodeExtent) -> Option<Ordering>

fn lt(&self, __arg_0: &CodeExtent) -> bool

fn le(&self, __arg_0: &CodeExtent) -> bool

fn gt(&self, __arg_0: &CodeExtent) -> bool

fn ge(&self, __arg_0: &CodeExtent) -> bool

impl PartialEq for CodeExtent

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

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

impl Clone for CodeExtent

fn clone(&self) -> CodeExtent

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