fn main() { // Box puts the value on the heap and owns it let boxed = Box::new(42); // deref to use the inner value println!("{}", *boxed + 1); }
Box<T> owns data on the heap