cranelift: Small documentation fixes (#5377)

* `translate_operator` doesn't return a boolean.
* `from_base_offset` doesn't panic if offset is smaller than base.
This commit is contained in:
Saúl Cabrera
2022-12-05 19:46:58 -05:00
committed by GitHub
parent 817c2b205c
commit 28cfa57533
2 changed files with 1 additions and 6 deletions

View File

@@ -63,10 +63,6 @@ impl RelSourceLoc {
}
/// Creates a new `RelSourceLoc` based on the given base and offset.
///
/// # Panics
///
/// Panics if the offset is smaller than the base.
pub fn from_base_offset(base: SourceLoc, offset: SourceLoc) -> Self {
if base.is_default() || offset.is_default() {
Self::default()