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

ICE with --pretty=expanded and async/await #53447

Closed
Ekleog opened this issue Aug 17, 2018 · 3 comments
Closed

ICE with --pretty=expanded and async/await #53447

Ekleog opened this issue Aug 17, 2018 · 3 comments
Labels
A-async-await Area: Async & Await A-pretty Area: Pretty printing (including `-Z unpretty`) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Ekleog
Copy link

Ekleog commented Aug 17, 2018

In tests/tests.rs:

#![feature(async_await)]

#[test]
fn non_stupid() {
    async { true }.wait();
}

when compiling with cargo rustc --test tests -- -Zunstable-options --pretty=expanded

Along with an empty src/lib.rs and the following Cargo.toml:

cargo-features = ["edition"]

[package]
name = "test"
edition = "2018"
version = "0.1.0"

Results in:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', libcore/option.rs:345:21
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::continue_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic
  10: syntax::print::pprust::State::print_expr_outer_attr_style
  11: syntax::print::pprust::State::print_stmt
  12: syntax::print::pprust::State::print_block_maybe_unclosed
  13: syntax::print::pprust::State::print_item
  14: syntax::print::pprust::print_crate
  15: rustc_driver::pretty::print_after_hir_lowering::{{closure}}
  16: rustc_driver::pretty::print_after_hir_lowering
  17: <rustc_driver::RustcDefaultCalls as rustc_driver::CompilerCalls<'a>>::build_controller::{{closure}}
  18: rustc_driver::driver::compile_input
  19: rustc_driver::run_compiler_with_pool
  20: syntax::with_globals
  21: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  22: __rust_maybe_catch_panic
  23: rustc_driver::run
  24: rustc_driver::main
  25: std::rt::lang_start::{{closure}}
  26: std::panicking::try::do_call
  27: __rust_maybe_catch_panic
  28: std::rt::lang_start_internal
  29: main
  30: __libc_start_main
  31: <unknown>
query stack during panic:
end of query stack
error: aborting due to 8 previous errors

Some errors occurred: E0412, E0422, E0425, E0433.
For more information about an error, try `rustc --explain E0412`.

error: internal compiler error: unexpected panic

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.30.0-nightly (d767ee116 2018-08-15) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unstable-options -C debuginfo=2 -C incremental

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

error: Could not compile `test`.
@Ekleog
Copy link
Author

Ekleog commented Aug 17, 2018

cc #50547

@estebank estebank added A-pretty Area: Pretty printing (including `-Z unpretty`) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-async-await Area: Async & Await labels Jan 11, 2019
@davidtwco
Copy link
Member

I can't reproduce this on rustc 1.33.0-nightly (ceb251214 2019-01-16).

@nikomatsakis
Copy link
Contributor

Closing as @davidtwco could not reproduce -- @Ekleog feel free to re-open if this is still a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await A-pretty Area: Pretty printing (including `-Z unpretty`) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants