Expands the relative source location into an absolute one, using the given base.
(&self, base: SourceLoc)
| 73 | |
| 74 | /// Expands the relative source location into an absolute one, using the given base. |
| 75 | pub fn expand(&self, base: SourceLoc) -> SourceLoc { |
| 76 | if self.is_default() || base.is_default() { |
| 77 | Default::default() |
| 78 | } else { |
| 79 | SourceLoc::new(self.0.wrapping_add(base.bits())) |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | /// Is this the default relative source location? |
| 84 | pub fn is_default(self) -> bool { |
no test coverage detected