Macro code_spells::aparecium
source · macro_rules! aparecium { ($item:expr) => { ... }; }
Expand description
Alias for Box::from_raw
. Useful if you have made something invisible with evanesco!
.
This is unsafe
as revealing something invisible might not be what the invisible thing wants,
and it might attack you and cause undefined behaviour.
Example
let a: &mut Vec<i32> = evanesco!(Box::new(vec![5; 100]));
assert_eq!(unsafe { aparecium!(a) }, Box::new(vec![5; 100]));