Lines Matching refs:SourceLoc
19 pub struct SourceLoc(u32); struct
21 impl SourceLoc { implementation
38 impl Default for SourceLoc { implementation
44 impl fmt::Display for SourceLoc { implementation
66 pub fn from_base_offset(base: SourceLoc, offset: SourceLoc) -> Self { in from_base_offset() argument
75 pub fn expand(&self, base: SourceLoc) -> SourceLoc { in expand() argument
79 SourceLoc::new(self.0.wrapping_add(base.bits())) in expand()
107 use crate::ir::SourceLoc;
112 assert_eq!(SourceLoc::default().to_string(), "@-"); in display()
113 assert_eq!(SourceLoc::new(0).to_string(), "@0000"); in display()
114 assert_eq!(SourceLoc::new(16).to_string(), "@0010"); in display()
115 assert_eq!(SourceLoc::new(0xabcdef).to_string(), "@abcdef"); in display()