Struct cranelift_codegen::ir::SourceLoc [−][src]
pub struct SourceLoc(_);
A source location.
This is an opaque 32-bit number attached to each Cranelift IR instruction. Cranelift does not interpret source locations in any way, they are simply preserved from the input to the output.
The default source location uses the all-ones bit pattern !0. It is used for instructions
that can't be given a real source location.
Methods
impl SourceLoc[src]
impl SourceLocpub fn new(bits: u32) -> Self[src]
pub fn new(bits: u32) -> SelfCreate a new source location with the given bits.
pub fn is_default(self) -> bool[src]
pub fn is_default(self) -> boolIs this the default source location?
pub fn bits(self) -> u32[src]
pub fn bits(self) -> u32Read the bits of this source location.
Trait Implementations
impl Clone for SourceLoc[src]
impl Clone for SourceLocfn clone(&self) -> SourceLoc[src]
fn clone(&self) -> SourceLocReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for SourceLoc[src]
impl Copy for SourceLocimpl Debug for SourceLoc[src]
impl Debug for SourceLocfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for SourceLoc[src]
impl PartialEq for SourceLocfn eq(&self, other: &SourceLoc) -> bool[src]
fn eq(&self, other: &SourceLoc) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &SourceLoc) -> bool[src]
fn ne(&self, other: &SourceLoc) -> boolThis method tests for !=.
impl Eq for SourceLoc[src]
impl Eq for SourceLocimpl Default for SourceLoc[src]
impl Default for SourceLocimpl Display for SourceLoc[src]
impl Display for SourceLoc