Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tide-cookies fails to compile with Rust Nightly newer than 2019-06-01 #278

Closed
gameldar opened this issue Jun 13, 2019 · 4 comments
Closed

Comments

@gameldar
Copy link

gameldar commented Jun 13, 2019

Largely this is here for a tracking bug of the issue within the rustc - see rust-lang/rust#61579

but it affects building master currently.

Bug Report

Building the master branch of Tide with a nightly newer than 2019-06-01 results in the following error:

error: internal compiler error: src/librustc_mir/transform/generator.rs:540: Broken MIR: generator contains type std::option::Option<data::CookieData> in MIR, but typeck only knows about for<'r> {data::CookieData, std::sync::Arc<std::sync::RwLock<cookie::jar::CookieJar>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = http::response::Response<http_service::Body>> + std::marker::Send + 'r)>>, ()}
  --> tide-cookies/src/middleware.rs:39:37
   |
39 |           FutureExt::boxed(async move {
   |  _____________________________________^
40 | |             let cookie_data = cx
41 | |                 .extensions_mut()
42 | |                 .remove()
...  |
63 | |             res
64 | |         })
   | |_________^

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:572:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to previous error


note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.37.0-nightly (400b409ef 2019-06-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `tide-cookies`

Environment

  • Rust toolchain version(s): [e.g. nightly-]
  • OS: Linux 4.19.0-5-amd64 SMP Debian 4.19.37-3 (2019-05-15) x86_64 GNU/Linux
realcr added a commit to realcr/tide that referenced this issue Jun 19, 2019
andreytkachenko added a commit to andreytkachenko/tide that referenced this issue Jun 19, 2019
Workaround for issue http-rs#278
tirr-c added a commit that referenced this issue Jun 24, 2019
Workaround for issue #278: works around Rust internal compiler error.
@l-7-l
Copy link

l-7-l commented Jun 24, 2019

i have same issue

error: internal compiler error: src/librustc_mir/transform/generator.rs:715: Broken MIR: generator contains type std::option::Option<cookies::CookieData> in MIR, but typeck only knows about for<'r> {cookies::CookieData, std::sync::Arc<std::sync::RwLock<cookie::jar::CookieJar>>, std::pin::Pin<std::boxed::Box<(dyn core::future::future::Future<Output = http::response::Response<http_service::Body>> + std::marker::Send + 'r)>>, ()}
  --> /Users/shaochenyang/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/tide-0.2.0/src/lib.rs:21:56
   |
21 |           ::futures::future::FutureExt::boxed(async move { $($t)* })
   |                                                          ^^^^^^^^^^
   | 
  ::: /Users/shaochenyang/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/tide-0.2.0/src/middleware/cookies.rs:34:9
   |
34 | /         box_async! {
35 | |             let cookie_data = cx
36 | |                 .extensions_mut()
37 | |                 .remove()
...  |
58 | |             res
59 | |         }
   | |_________- in this macro invocation

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:578:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to previous error


note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.37.0-nightly (de7c4e423 2019-06-23) running on x86_64-apple-darwin

note: compiler flags: -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `tide`.


Meta

rustc --version --verbose

rustc 1.37.0-nightly (de7c4e423 2019-06-23)
binary: rustc
commit-hash: de7c4e42314c56528640e3b663aa10e0caa6bd9b
commit-date: 2019-06-23
host: x86_64-apple-darwin
release: 1.37.0-nightly
LLVM version: 8.0

it seems like same problem with #61834

there is a PR #61872

@yoshuawuyts
Copy link
Member

yoshuawuyts commented Jul 5, 2019

I just installed the latest nightly, updated master, and everything seems to work without a problem. Can people confirm if this is still a problem?

@DCjanus
Copy link
Contributor

DCjanus commented Jul 5, 2019

It seems to have been fixed.

@yoshuawuyts
Copy link
Member

Yay, that's great news. Going to go ahead and close this then (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants