]>
Commit | Line | Data |
---|---|---|
1 | error[E0308]: mismatched types | |
2 | --> $DIR/call-boxed.rs:4:9 | |
3 | | | |
4 | LL | let mut x = 1i32; | |
5 | | ---- expected due to this value | |
6 | LL | let y = Box::new(|| 1); | |
7 | | -- the found closure | |
8 | LL | x = y; | |
9 | | ^ expected `i32`, found struct `Box` | |
10 | | | |
11 | = note: expected type `i32` | |
12 | found struct `Box<[closure@$DIR/call-boxed.rs:3:22: 3:24]>` | |
13 | help: use parentheses to call this closure | |
14 | | | |
15 | LL | x = y(); | |
16 | | ++ | |
17 | ||
18 | error: aborting due to previous error | |
19 | ||
20 | For more information about this error, try `rustc --explain E0308`. |