Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unused)]
- struct Foo([u8; 64]);
- fn get_foo() -> (Foo, Box<Foo>) {
- (Foo([0; 64]), Box::new(Foo([0; 64])))
- }
- fn get_bar() {
- ...
- let foo = get_foo();
- ...
- foo
- }
- fn main() {
- let foo_vec = vec![Box::new(Foo([0; 64])); 1000];
- for foo in &foo_vec {
- foo.0[32]
- }
- let _ = get_bar();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement