diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2023-09-05 11:39:52 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2023-09-05 11:39:52 -0300 |
commit | b49e8e6ca2185396b8cd05d0b4b83b3ae6b80dae (patch) | |
tree | 0d4a53f42c710668ec265be4967cfb20a5919caf /tests/ui/no_uaf_2.rs | |
parent | dbc79bbbc30308a86788b9b3d49b8f4c3b39b30a (diff) |
Update crate documentation
Hopefully this clarifies things
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 |