Skip to content

Commit 1adba76

Browse files
committed
add utility to find converters
1 parent 126b263 commit 1adba76

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cranelift/isle/isle/src/sema.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2621,6 +2621,11 @@ impl TermEnv {
26212621
.and_then(|sym| self.term_map.get(&sym))
26222622
.copied()
26232623
}
2624+
2625+
/// Lookup a declared implicit converter term for `(inner_ty, outer_ty)`.
2626+
pub fn get_converter_term_id(&self, inner_ty: TypeId, outer_ty: TypeId) -> Option<TermId> {
2627+
self.converters.get(&(inner_ty, outer_ty)).copied()
2628+
}
26242629
}
26252630

26262631
#[cfg(test)]

0 commit comments

Comments
 (0)