rust-lang/rust

ICE: the following error was constructed but not emitted

Closed this issue · 0 comments

Code

fn bar() -> impl Into<<() as Reexported;

Meta

rustc --version --verbose:

rustc 1.61.0-nightly (051d1176b 2022-03-21)
binary: rustc
commit-hash: 051d1176b786aadd7d7c048f822cb6bfab00fe03
commit-date: 2022-03-21
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0

Error output

error: internal compiler error: the following error was constructed but not emitted

error: expected one of `(`, `::`, `<`, or `>`, found `;`
 --> ./icemaker_22287.rs:1:40
  |
1 | fn bar() -> impl Into<<() as Reexported;
  |                                        ^ expected one of `(`, `::`, `<`, or `>`

thread 'rustc' panicked at 'explicit panic', compiler/rustc_errors/src/diagnostic_builder.rs:508:21
Backtrace

error: internal compiler error: the following error was constructed but not emitted

error: expected one of `(`, `::`, `<`, or `>`, found `;`
 --> ./icemaker_22287.rs:1:40
  |
1 | fn bar() -> impl Into<<() as Reexported;
  |                                        ^ expected one of `(`, `::`, `<`, or `>`

thread 'rustc' panicked at 'explicit panic', compiler/rustc_errors/src/diagnostic_builder.rs:508:21
stack backtrace:
   0:     0x7f39d729d7dd - std::backtrace_rs::backtrace::libunwind::trace::h8f2aa9467a8ea026
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f39d729d7dd - std::backtrace_rs::backtrace::trace_unsynchronized::h3136bc26752c6002
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f39d729d7dd - std::sys_common::backtrace::_print_fmt::hcf2e66745468d7c2
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f39d729d7dd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1fb83521f13808af
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f39d72f745c - core::fmt::write::hb86041a2953bde7e
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f39d728ede1 - std::io::Write::write_fmt::hc13aeb9d6ab8ff5e
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/io/mod.rs:1655:15
   6:     0x7f39d72a08c5 - std::sys_common::backtrace::_print::h02378145fa4fdd5c
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f39d72a08c5 - std::sys_common::backtrace::print::hf9d4b2382bc87d90
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f39d72a08c5 - std::panicking::default_hook::{{closure}}::h42dab6bc1050f808
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/panicking.rs:295:22
   9:     0x7f39d72a0579 - std::panicking::default_hook::ha4fca20446a8f8e0
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/panicking.rs:314:9
  10:     0x7f39d7acb081 - rustc_driver[87ac570781e8703e]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f39d72a1010 - std::panicking::rust_panic_with_hook::h3726470cb4ea2029
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/panicking.rs:702:17
  12:     0x7f39d72a0e09 - std::panicking::begin_panic_handler::{{closure}}::h9dffb2f82c9daa41
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/panicking.rs:586:13
  13:     0x7f39d729dc94 - std::sys_common::backtrace::__rust_end_short_backtrace::hbea31bf1229ce184
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7f39d72a0b79 - rust_begin_unwind
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/panicking.rs:584:5
  15:     0x7f39d7264c83 - core::panicking::panic_fmt::h666888c245dab630
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/core/src/panicking.rs:143:14
  16:     0x7f39d7264b4d - core::panicking::panic::h6597bca74d69e522
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/core/src/panicking.rs:48:5
  17:     0x7f39d98d753d - <rustc_errors[574e2a4922ef69a7]::diagnostic_builder::DiagnosticBuilderInner as core[4876a1d158bb9bd6]::ops::drop::Drop>::drop
  18:     0x7f39d87de23d - core[4876a1d158bb9bd6]::ptr::drop_in_place::<rustc_errors[574e2a4922ef69a7]::diagnostic_builder::DiagnosticBuilderInner>
  19:     0x7f39d9602123 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_generic_arg
  20:     0x7f39d9600b00 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_angle_args
  21:     0x7f39d95f9819 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_path_inner
  22:     0x7f39da05fc06 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_generic_bounds_common
  23:     0x7f39d960e4a9 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_ty_common
  24:     0x7f39d95e350d - <rustc_parse[1c083310755f246]::parser::Parser>::parse_fn_decl
  25:     0x7f39d95de857 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_fn
  26:     0x7f39d95d1d83 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_item_common
  27:     0x7f39d95d0c74 - <rustc_parse[1c083310755f246]::parser::Parser>::parse_mod
  28:     0x7f39da064a98 - rustc_parse[1c083310755f246]::parse_crate_from_file
  29:     0x7f39d996c949 - <rustc_session[ac7cec02d905b468]::session::Session>::time::<core[4876a1d158bb9bd6]::result::Result<rustc_ast[69fa3ac18e06f03c]::ast::Crate, rustc_errors[574e2a4922ef69a7]::diagnostic_builder::DiagnosticBuilder<rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>>, rustc_interface[e861b01a78ec4340]::passes::parse::{closure#0}>
  30:     0x7f39d995750a - rustc_interface[e861b01a78ec4340]::passes::parse
  31:     0x7f39d994f1c6 - <rustc_interface[e861b01a78ec4340]::queries::Queries>::parse
  32:     0x7f39d9914fb8 - <rustc_interface[e861b01a78ec4340]::interface::Compiler>::enter::<rustc_driver[87ac570781e8703e]::run_compiler::{closure#1}::{closure#2}, core[4876a1d158bb9bd6]::result::Result<core[4876a1d158bb9bd6]::option::Option<rustc_interface[e861b01a78ec4340]::queries::Linker>, rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>>
  33:     0x7f39d99281af - rustc_span[60a3f5ca967095f8]::with_source_map::<core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>, rustc_interface[e861b01a78ec4340]::interface::create_compiler_and_run<core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>, rustc_driver[87ac570781e8703e]::run_compiler::{closure#1}>::{closure#1}>
  34:     0x7f39d9927014 - rustc_interface[e861b01a78ec4340]::interface::create_compiler_and_run::<core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>, rustc_driver[87ac570781e8703e]::run_compiler::{closure#1}>
  35:     0x7f39d9912b32 - <scoped_tls[6ef20bc3db7a89c6]::ScopedKey<rustc_span[60a3f5ca967095f8]::SessionGlobals>>::set::<rustc_interface[e861b01a78ec4340]::interface::run_compiler<core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>, rustc_driver[87ac570781e8703e]::run_compiler::{closure#1}>::{closure#0}, core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>>
  36:     0x7f39d9910e9f - std[dc4a44e6500af6d6]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e861b01a78ec4340]::util::run_in_thread_pool_with_globals<rustc_interface[e861b01a78ec4340]::interface::run_compiler<core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>, rustc_driver[87ac570781e8703e]::run_compiler::{closure#1}>::{closure#0}, core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>>::{closure#0}, core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>>
  37:     0x7f39d9929142 - <<std[dc4a44e6500af6d6]::thread::Builder>::spawn_unchecked_<rustc_interface[e861b01a78ec4340]::util::run_in_thread_pool_with_globals<rustc_interface[e861b01a78ec4340]::interface::run_compiler<core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>, rustc_driver[87ac570781e8703e]::run_compiler::{closure#1}>::{closure#0}, core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>>::{closure#0}, core[4876a1d158bb9bd6]::result::Result<(), rustc_errors[574e2a4922ef69a7]::ErrorGuaranteed>>::{closure#1} as core[4876a1d158bb9bd6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  38:     0x7f39d72ab203 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hcce36b620f35d4e9
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/alloc/src/boxed.rs:1853:9
  39:     0x7f39d72ab203 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1326b7d61e2439e7
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/alloc/src/boxed.rs:1853:9
  40:     0x7f39d72ab203 - std::sys::unix::thread::Thread::new::thread_start::h41aeae6f6384341e
                               at /rustc/051d1176b786aadd7d7c048f822cb6bfab00fe03/library/std/src/sys/unix/thread.rs:108:17
  41:     0x7f39d70835c2 - start_thread
  42:     0x7f39d7108584 - __clone
  43:                0x0 - <unknown>

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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.61.0-nightly (051d1176b 2022-03-21) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 2 previous errors