Closed
Description
Not sure what's going on here, it works fine with cargo 1.42.0-nightly (9d32b7b01 2020-01-26)
, but using cg_cranelift breaks:
$ CHANNEL="release" ../rustc_codegen_cranelift/cargo.sh run
rustc_codegen_cranelift is build for rustc 1.42.0-nightly (cd1ef390e 2020-01-31) but the default rustc version is rustc 1.41.0 (5e1a79984 2020-01-27).
Using rustc 1.42.0-nightly (cd1ef390e 2020-01-31).
error[E0277]: expected a `std::ops::Fn<()>` closure, found `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
--> src/web/mod.rs:113:44
|
113 | let shared_resources = Self::chain(&pool_factory, rustdoc::SharedResourceHandler);
| ^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
|
= help: the trait `std::ops::Fn<()>` is not implemented for `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
= note: wrap the `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>` in a closure with no arguments: `|| { /* code */ }
= note: required for the cast to the object type `dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync`
error[E0277]: expected a `std::ops::Fn<()>` closure, found `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
--> src/web/mod.rs:114:40
|
114 | let router_chain = Self::chain(&pool_factory, routes.iron_router());
| ^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
|
= help: the trait `std::ops::Fn<()>` is not implemented for `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
= note: wrap the `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>` in a closure with no arguments: `|| { /* code */ }
= note: required for the cast to the object type `dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync`
error[E0277]: expected a `std::ops::Fn<()>` closure, found `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
--> src/web/mod.rs:184:29
|
184 | Self::chain(&self.pool_factory, err).handle(req)
| ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
|
= help: the trait `std::ops::Fn<()>` is not implemented for `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>`
= note: wrap the `std::boxed::Box<(dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync + 'static)>` in a closure with no arguments: `|| { /* code */ }
= note: required for the cast to the object type `dyn std::ops::Fn() -> web::pool::Pool + std::marker::Send + std::marker::Sync`