fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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