carllerche / tower-web

A fast, boilerplate free, web framework for Rust
MIT License
980 stars 51 forks source link

Can't build with latest nightly (`async fn` is not permitted in the 2015 edition) #192

Closed lnicola closed 5 years ago

lnicola commented 5 years ago

So I'm not sure why this happens, as I'm not using async-await-preview, but..

   Compiling tower-web v0.3.5
error[E0670]: `async fn` is not permitted in the 2015 edition
  --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/tower-web-0.3.5/src/codegen/mod.rs:53:5
   |
53 |     async fn map_ok<T, E>(future: T) -> Result<T::Output, E>
   |     ^^^^^

error: aborting due to previous error
lnicola commented 5 years ago

Maybe splitting that module to a different file would help.

carllerche commented 5 years ago

great!

carllerche commented 5 years ago

A new crate was pushed.

Benjamin-L commented 5 years ago

I'm still having this problem when using async-await-preview with 0.3.7 on crates.io. I'm not sure if there's a good way to fix it though.

lnicola commented 5 years ago

Yeah, my fix only made the crate build when not using the feature. I assume it needs to be ported to the 2018 edition for it to work.