diff options
Diffstat (limited to 'tests/ui/no_uaf_2.rs')
-rw-r--r-- | tests/ui/no_uaf_2.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/no_uaf_2.rs b/tests/ui/no_uaf_2.rs index eb6b7d3..49694b2 100644 --- a/tests/ui/no_uaf_2.rs +++ b/tests/ui/no_uaf_2.rs @@ -6,7 +6,7 @@ use std::cell::Cell; use std::pin::pin; use selfref::opaque; -use selfref::{new_with_closure, Holder}; +use selfref::Holder; struct MyStruct<'this> { cell: Cell<&'this str>, @@ -22,7 +22,7 @@ opaque! { fn main() { let s = - Holder::<'_, MyStructKey>::new_with(new_with_closure::<MyStructKey, _>(|[]| MyStruct { + Holder::<'_, MyStructKey>::new_with(|builder| builder.build(MyStruct { cell: Default::default(), })); let s = pin!(s); |