]>
Commit | Line | Data |
---|---|---|
1b1a35ee XL |
1 | error[E0308]: mismatched types |
2 | --> $DIR/issue-51154.rs:2:30 | |
3 | | | |
4 | LL | fn foo<F: FnMut()>() { | |
ed00b5ec | 5 | | - expected this type parameter |
1b1a35ee | 6 | LL | let _: Box<F> = Box::new(|| ()); |
923072b8 FG |
7 | | -------- ^^^^^ expected type parameter `F`, found closure |
8 | | | | |
9 | | arguments to this function are incorrect | |
1b1a35ee XL |
10 | | |
11 | = note: expected type parameter `F` | |
781aab86 | 12 | found closure `{closure@$DIR/issue-51154.rs:2:30: 2:32}` |
1b1a35ee | 13 | = help: every closure has a distinct type and so could not always match the caller-chosen type of parameter `F` |
923072b8 FG |
14 | note: associated function defined here |
15 | --> $SRC_DIR/alloc/src/boxed.rs:LL:COL | |
1b1a35ee XL |
16 | |
17 | error: aborting due to previous error | |
18 | ||
19 | For more information about this error, try `rustc --explain E0308`. |