diff --git a/compiler/cl-structures/src/intern.rs b/compiler/cl-structures/src/intern.rs index 5c04d8b..1858e3e 100644 --- a/compiler/cl-structures/src/intern.rs +++ b/compiler/cl-structures/src/intern.rs @@ -35,6 +35,11 @@ pub mod interned { pub fn as_ptr(interned: &Self) -> *const T { interned.value } + + /// Gets the internal value as a reference with the interner's lifetime + pub fn to_ref(interned: &Self) -> &'a T { + interned.value + } } impl Debug for Interned<'_, T> {