2 ms·
Assuming you're using a region crate like bumpalo, the type of itr is &'a T, where 'a is the lifetime of ptr. This means that ptr has to be anchored in a stack
by pcwalton 7y ago
Assuming you're using a region crate like bumpalo, the type of itr is &'a T, where 'a is the lifetime of ptr. This means that ptr has to be anchored in a stack frame. I haven't looked at Verona specifically, but region systems all have this restriction (for example, ML Kit, the originator of regions, required a lexical "letregion" construct), unless they use dependent types.