summary refs log tree commit diff stats
path: root/tests/ui/no_uaf_2.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-12-05 16:32:20 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-12-05 16:32:20 -0300
commit72841de072c4a904983e9eb631b690a61d3e06ff (patch)
tree18b5677a9bcc61e77a140b9012c1d82333e2f4f1 /tests/ui/no_uaf_2.rs
parent2b5d0cb87b13fd5354143bb0b802d06ca0715ca6 (diff)
Use closures for new_with
Diffstat (limited to 'tests/ui/no_uaf_2.rs')
-rw-r--r--tests/ui/no_uaf_2.rs4
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);