Skip to content

Failed to run cargo rustc --profile=check -- -Zunstable-options --pretty=expanded on simple code with comments #64833

Closed as not planned
@olegnn

Description

@olegnn

Code:

fn main() {}
/*
*/

Command (used to expand macros):

RUST_BACKTRACE=full cargo rustc --profile=check -- -Zunstable-options --pretty=expanded

Result:

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `1`', src/libsyntax/print/pprust.rs:491:17
stack backtrace:
   0:        0x109cd6155 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfa26be1652cd9787
   1:        0x109d0ce10 - core::fmt::write::h9204dad1f05752a2
   2:        0x109cc97ab - std::io::Write::write_fmt::h3236e023140ca9e5
   3:        0x109cda49a - std::panicking::default_hook::{{closure}}::h6b39e7bec1c0e07f
   4:        0x109cda1a5 - std::panicking::default_hook::hd940c417edf5953e
   5:        0x107236962 - rustc_driver::report_ice::he8f462601d7e6546
   6:        0x109cdacd2 - std::panicking::rust_panic_with_hook::hb5f0fb06584b7c80
   7:        0x109cda73d - std::panicking::continue_panic_fmt::hfee7d7df13a8f380
   8:        0x109cda69e - std::panicking::begin_panic_fmt::hf84ec34c30992fe3
   9:        0x108c59f71 - syntax::print::pprust::PrintState::print_comment::h24e7691f3cd985b3
  10:        0x108c5259d - syntax::print::pprust::print_crate::h8bcae347660e5c9a
  11:        0x1071df51f - rustc_driver::pretty::print_after_hir_lowering::{{closure}}::h84dff5163ceef5e6
  12:        0x1071dded7 - rustc_driver::pretty::print_after_hir_lowering::h5c41c09a7531a919
  13:        0x107205c7f - rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}::hc486952ecd38d4e9
  14:        0x10732d5bb - rustc_interface::passes::create_global_ctxt::{{closure}}::h8852eb73e68f14aa
  15:        0x1072068e0 - rustc_interface::interface::run_compiler_in_existing_thread_pool::h33cd099bc358d208
  16:        0x1072382d4 - std::thread::local::LocalKey<T>::with::h2792dce5fe6fe5af
  17:        0x10723c6d2 - scoped_tls::ScopedKey<T>::set::h16d79aeca6a52ed8
  18:        0x107255575 - syntax::with_globals::h92b424eebfdbfd3d
  19:        0x1071ca8ad - std::sys_common::backtrace::__rust_begin_short_backtrace::haa6aa3f0127b885d
  20:        0x109ce9f7f - __rust_maybe_catch_panic
  21:        0x1071fb427 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hd2853b0c0007f607
  22:        0x109cbbffe - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h26e311d1235d42ea
  23:        0x109ce8d8e - std::sys::unix::thread::Thread::new::thread_start::h3569effff07e966a
  24:     0x7fff769f02eb - _pthread_body
  25:     0x7fff769f3249 - _pthread_start

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.40.0-nightly (ddf43867a 2019-09-26) running on x86_64-apple-darwin

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

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

query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions