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

compiler panicked at 'Box<Any>' #61664

Closed
JuanPotato opened this issue Jun 8, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@JuanPotato
Copy link

commented Jun 8, 2019

Hi, I was working on a project on 1.36.0 nightly and when I upgraded to 1.37.0 nightly (rustc 1.37.0-nightly (d132f54 2019-06-07) running on x86_64-unknown-linux-gnu) I got an internal compiler error.

https://github.com/JuanPotato/XKCD-search-bot/tree/d7624b25fbeb57975b54a19d9c8e8103b0d261a4 is the project, and the current code should cause this error

Error log
error: internal compiler error: src/librustc_mir/transform/generator.rs:532: Broken MIR: generator contains type std::option::Option in MIR, but typeck only knows about for<'r, 's, 't0, 't1, 't2> {std::sync::Arc, impl Iterator, std::collections::HashMap, std::iter::Filter, [closure@src/scraper.rs:71:43: 71:56]>, futures_channel::mpsc::Sender<(scraper::XkcdInfo, usize)>, futures_channel::mpsc::Receiver<(scraper::XkcdInfo, usize)>, std::vec::Vec>, fn(std::ops::Range) ->  as std::iter::IntoIterator>::IntoIter { as std::iter::IntoIterator>::into_iter}, usize, std::ops::Range, &'r mut std::iter::Filter, [closure@src/scraper.rs:71:43: 71:56]>, std::option::Option, futures_channel::mpsc::Sender, futures_channel::mpsc::Receiver, impl core::future::future::Future, futures_util::sink::send::Send<'s, futures_channel::mpsc::Sender, usize>, (), futures_util::stream::next::Next<'t0, futures_channel::mpsc::Receiver<(scraper::XkcdInfo, usize)>>, std::option::Option<(scraper::XkcdInfo, usize)>, scraper::XkcdInfo, &'t1 mut std::iter::Filter, [closure@src/scraper.rs:71:43: 71:56]>, futures_util::sink::send::Send<'t2, futures_channel::mpsc::Sender, usize>}
   --> src/scraper.rs:70:32
    |
70  |   ) -> HashMap {
    |  ________________________________^
71  | |     let mut xkcd_nums = comic_nums.filter(|&n| n != 404); // remove 404 if found
72  | |
73  | |     const MAX_WORKERS: usize = 250;
...   |
104 | |     xkcd_comics
105 | | }
    | |_^

thread 'rustc' panicked at 'Box', src/librustc_errors/lib.rs:573: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 (d132f544f 2019-06-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 --crate-type bin

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

This comment has been minimized.

Copy link
Author

commented Jun 8, 2019

Is this a duplicate of #61579

@mati865

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

Yes, it's duplicate.

@jonas-schievink

This comment has been minimized.

Copy link
Member

commented Jun 9, 2019

Looks like it. Closing in favor of #61579.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.