fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/suggest-boxed-empty-block.rs:10:9 3 | 4LL | foo({}); 5 | ^^ expected `Box<_>`, found `()` 6 | 7 = note: expected struct `Box<_>` 8 found unit type `()` 9 = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html 10help: store this in the heap by calling `Box::new` 11 | 12LL - foo({}); 13LL + foo(Box::new(())); 14 | 15 16error[E0308]: mismatched types 17 --> $DIR/suggest-boxed-empty-block.rs:11:12 18 | 19LL | bar(|| {}); 20 | ^^ expected `Box<_>`, found `()` 21 | 22 = note: expected struct `Box<_>` 23 found unit type `()` 24 = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html 25help: store this in the heap by calling `Box::new` 26 | 27LL - bar(|| {}); 28LL + bar(|| Box::new(())); 29 | 30 31error: aborting due to 2 previous errors 32 33For more information about this error, try `rustc --explain E0308`.