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 SourceLoc
pub fn new(bits: u32) -> Self
[src]
pub fn new(bits: u32) -> Self
Create a new source location with the given bits.
pub fn is_default(self) -> bool
[src]
pub fn is_default(self) -> bool
Is this the default source location?
pub fn bits(self) -> u32
[src]
pub fn bits(self) -> u32
Read the bits of this source location.
Trait Implementations
impl Clone for SourceLoc
[src]
impl Clone for SourceLoc
fn clone(&self) -> SourceLoc
[src]
fn clone(&self) -> SourceLoc
Returns 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 SourceLoc
impl Debug for SourceLoc
[src]
impl Debug for SourceLoc
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for SourceLoc
[src]
impl PartialEq for SourceLoc
fn eq(&self, other: &SourceLoc) -> bool
[src]
fn eq(&self, other: &SourceLoc) -> bool
This 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) -> bool
This method tests for !=
.
impl Eq for SourceLoc
[src]
impl Eq for SourceLoc
impl Default for SourceLoc
[src]
impl Default for SourceLoc
impl Display for SourceLoc
[src]
impl Display for SourceLoc