diff options
Diffstat (limited to 'tests/ui/no_uaf_2.rs')
-rw-r--r-- | tests/ui/no_uaf_2.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/ui/no_uaf_2.rs b/tests/ui/no_uaf_2.rs index 49694b2..53e3ad8 100644 --- a/tests/ui/no_uaf_2.rs +++ b/tests/ui/no_uaf_2.rs @@ -1,9 +1,6 @@ // by steffahn -#![feature(pin_macro)] - use std::cell::Cell; -use std::pin::pin; use selfref::opaque; use selfref::Holder; @@ -25,7 +22,7 @@ fn main() { Holder::<'_, MyStructKey>::new_with(|builder| builder.build(MyStruct { cell: Default::default(), })); - let s = pin!(s); + let s = Box::pin(s); s.as_ref().operate_in(|r| { r.cell.set(&String::from("hello world")); // temporary dropped at end of this statement println!("{}", r.cell.get()) // accesses dropped `String` data |