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

cargo fmt crashes with internal compiler error: Error constructed but not emitted #2648

Closed
nrc opened this issue Apr 25, 2018 · 1 comment
Closed
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@nrc
Copy link
Member

nrc commented Apr 25, 2018

Moved from rust-lang/rust#50181 cc @djc

/home/djc/src/quinn/src/crypto.rs:5:22: 5:24 error: expected one of `,` or `as`, found `::`
/home/djc/src/quinn/src/crypto.rs:5 use ring::{hkdf, aead::{self, AES_128_GCM, OpeningKey, SealingKey}, digest::SHA256,
                                                         ^~
error: internal compiler error: Error constructed but not emitted
thread '<main>' panicked at 'explicit panic', .cargo/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.32.0/src/errors/mod.rs:361
stack backtrace:
   1:     0x55cd9e8bfdc0 - std::sys::backtrace::tracing::imp::write::h82353b94d9957b5a
   2:     0x55cd9e8c2d1b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hd08c9fd28a21a931
   3:     0x55cd9e8c29a3 - std::panicking::default_hook::h9f5ce461fe95b992
   4:     0x55cd9e8b43e8 - std::panicking::rust_panic_with_hook::hfb9137c9fa89bbb0
   5:     0x55cd9e702c2f - std::panicking::begin_panic::h91a119e8e2811f21
   6:     0x55cd9e704c3f - _<errors..DiagnosticBuilder<'a> as std..ops..Drop>::drop::hf9983317f4db5217
   7:     0x55cd9e61628b - rustfmt::format_input::h8022487cb48abb62
   8:     0x55cd9e61b026 - rustfmt::run::hc3c3f45cca8c2090
   9:     0x55cd9e607be0 - rustfmt::execute::h1567d35cf029b277
  10:     0x55cd9e60aa06 - rustfmt::main::h72bee7f7a14fa8c0
  11:     0x55cd9e8c25e8 - std::panicking::try::call::h707222b2d912b2ed
  12:     0x55cd9e8ccf7b - __rust_try
  13:     0x55cd9e8ccf1e - __rust_maybe_catch_panic
  14:     0x55cd9e8c2013 - std::rt::lang_start::h801b666f82634252
  15:     0x7fde02c8e540 - __libc_start_main
  16:     0x55cd9e601f28 - _start
  17:                0x0 - <unknown>
@nrc
Copy link
Member Author

nrc commented Apr 25, 2018

@djc are you using a very old version of Rustfmt? We haven't used syntax-syntex for a long time.

If you install from Rustup you should be fine, if you install via Cargo make sure you are using rustfmt-nightly and not plain rustfmt

@nrc nrc closed this as completed Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

1 participant