-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
This simple code produces undefined behavior without unsafe code involved.
use interior_mutability_pointer::Imp;
fn main() {
let mut a = Imp::new(vec![1]);
let mut b = a.clone();
let x = &mut a[0];
b.clear();
b.shrink_to_fit();
println!("{}", *x); // USE AFTER FREE
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed