error[E0521]: borrowed data escapes outside of closure --> tests/ui/no_uaf_1.rs:23:13 | 21 | let rc_clone = rc.clone(); | -------- `rc_clone` declared here, outside of the closure body 22 | let x = Holder::<'_, FooOpaque>::new_with(move |builder| { | ------- `builder` is a reference that is only valid in the closure body 23 | / builder.build(Foo { 24 | | x: "Hello".to_owned(), 25 | | y: rc_clone, 26 | | }); | |______________^ `builder` escapes the closure body here | = note: requirement occurs because of a mutable reference to `selfref::Builder<'_, FooOpaque>` = note: mutable references are invariant over their type parameter = help: see for more information about variance