mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-03 07:48:12 +08:00
State what contains the laundered arena borrow in the flatten test
This commit is contained in:
@@ -881,7 +881,11 @@ mod tests {
|
|||||||
let head = ctx.index_head();
|
let head = ctx.index_head();
|
||||||
let group = {
|
let group = {
|
||||||
// SAFETY: the element is cloned out inside the scope, so no borrow
|
// SAFETY: the element is cloned out inside the scope, so no borrow
|
||||||
// into the frame escapes it.
|
// into the frame escapes it. The clone is shallow, so the `'static`
|
||||||
|
// the `GraphicSource` rows infer launders a borrow of `arena`: it is
|
||||||
|
// contained because `arena` outlives every use below and this test
|
||||||
|
// never resets it, so the interior stays resident for the whole
|
||||||
|
// generation the group is read in.
|
||||||
let scope = frames.scope();
|
let scope = frames.scope();
|
||||||
let GPoll::Final(value) = record::serve_input(&wrapped, &ctx.promoted(&head, 0), &scope) else {
|
let GPoll::Final(value) = record::serve_input(&wrapped, &ctx.promoted(&head, 0), &scope) else {
|
||||||
panic!("expected a final record");
|
panic!("expected a final record");
|
||||||
|
|||||||
Reference in New Issue
Block a user