error: lifetime may not live long enough
--> tests/compile_fail/nodeptr_escapes_build_scope.rs:58:49
|
58 | .build_scoped(&cfg, &mut prims, &B, |r| r.root_ptr())
| -- ^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`
| ||
| |return type of closure is Option<NodePtr<'2, Node<'_>>>
| has type `BvhResult<'1, B>`
|
= note: requirement occurs because of the type `NodePtr<'_, Node<'_>>`, which makes the generic argument `'_` invariant
= note: the struct `NodePtr<'id, N>` is invariant over the parameter `'id`
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance