当前位置: 首页 > 工具软件 > C2Rust > 使用案例 >

玩rust进服务器显示eac,thread 'rustc' panicked at 'called

西门马鲁
2023-12-01

This issue appears in the nightly compiler since toolchain version nightly-2020-08-14 (rustc 1.47.0-nightly (81dc88f88 2020-08-13)). It does not appear with toolchain nightly-2020-08-13 (rustc 1.47.0-nightly (576d27c5a 2020-08-12)) or earlier.

Code

Create an empty project and add the following dependency.

[dependencies]

naga = {git = "https://github.com/gfx-rs/naga", rev = "1eb637038dd15fc1dad770eca8e6943424dbc122"}

Upon cargo run, rustc panics with the below output.

Meta

rustc --version --verbose:

rustc 1.47.0-nightly (8e21bd063 2020-08-14)

binary: rustc

commit-hash: 8e21bd0633b8d970646ee6eb706c9e8acfad19af

commit-date: 2020-08-14

host: x86_64-pc-windows-msvc

release: 1.47.0-nightly

LLVM version: 10.0

Error output

Compiling naga v0.1.0 (https://github.com/gfx-rs/naga?rev=1eb637038dd15fc1dad770eca8e6943424dbc122#1eb63703)

Running `rustc --crate-name naga --edition=2018 C:\Users\Chris\.cargo\git\checkouts\naga-dbb2b19faed49210\1eb6370\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C debuginfo=2 --cfg "feature=\"default\"" -C metadata=b78cb55e6bbf7f02 -C extra-filename=-b78cb55e6bbf7f02 --out-dir C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps -L dependency=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps --extern bitflags=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libbitflags-b3aa381b8c8a158c.rmeta --extern fxhash=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libfxhash-abd942eca949d6c8.rmeta --extern log=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\liblog-5edde9ce5ee6a1cc.rmeta --extern num_traits=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libnum_traits-55b459a906b3f58a.rmeta --extern thiserror=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libthiserror-cd69ea1eee32f495.rmeta --cap-lints allow`

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src\librustc_mir\transform\match_branches.rs:54:81

stack backtrace:

0: 0x7fff5d918ff9 - <:sys_common::backtrace::_print::displaybacktrace as core::fmt::display>::fmt::hfae6a97726d8b736

1: 0x7fff5d94599c - core::fmt::write::hce2ddfec834877b8

2: 0x7fff5d90ad9c - <:io::ioslice as core::fmt::debug>::fmt::h57a15d9f0ff2a3bc

3: 0x7fff5d91e5cb - std::panicking::take_hook::h1925373a96008b93

4: 0x7fff5d91e218 - std::panicking::take_hook::h1925373a96008b93

5: 0x7fff246954fa - rustc_driver::report_ice::h91547ccde81af24e

6: 0x7fff5d91ef70 - std::panicking::rust_panic_with_hook::h7f7de81d557f54d3

7: 0x7fff5d91eaa5 - rust_begin_unwind

8: 0x7fff5d9198af - <:sys_common::backtrace::_print::displaybacktrace as core::fmt::display>::fmt::hfae6a97726d8b736

9: 0x7fff5d91ea59 - rust_begin_unwind

10: 0x7fff5d9422e0 - core::panicking::panic_fmt::h599cc82b32e741b9

11: 0x7fff5d94222c - core::panicking::panic::h4d7ada597da16bd9

12: 0x7fff27526e42 - <:transform::match_branches::matchbranchsimplification as rustc_mir::transform::mirpass>::run_pass::hb91e63ab8948ed14

13: 0x7fff2766e0d9 - rustc_mir::transform::run_passes::hc006433f70a0d186

14: 0x7fff27670942 - rustc_mir::transform::run_passes::hc006433f70a0d186

15: 0x7fff27670eac - rustc_mir::transform::run_passes::hc006433f70a0d186

16: 0x7fff27670bf3 - rustc_mir::transform::run_passes::hc006433f70a0d186

17: 0x7fff2855369d - rustc_feature::UnstableFeatures::is_nightly_build::hf20f74c3bb454638

18: 0x7fff286135e9 - ZN12rustc_middle2ty5print6pretty66_DERIVE_rustc_middle_ty_Lift_lifted_FOR_TraitRefPrintOnlyTraitPath121_$LT$impl$u20$rustc_middle..ty..context..Lift$u20$for$u20$rustc_middle..ty..print..pretty..TraitRefPrintOnlyTraitPath$GT$11lift_to_tcx17h98c3c4fb98b9687

19: 0x7fff28419e29 - rustc_feature::UnstableFeatures::is_nightly_build::hf20f74c3bb454638

20: 0x7fff28709dbb - rustc_middle::ty::::instance_mir::h76dbaaa3af662a3c

21: 0x7fff27443394 - <:monomorphize::collector::rootcollector as rustc_hir::itemlikevisit::itemlikevisitor>::visit_impl_item::h5cd1c489b5156be3

22: 0x7fff2743df69 - rustc_mir::monomorphize::collector::collect_crate_mono_items::h353c8d9ad96cacce

23: 0x7fff275546d6 - <:dataflow::impls::borrows::borrowindex as core::fmt::debug>::fmt::h983c54cf04b64bf1

24: 0x7fff2743c7ac - rustc_mir::monomorphize::collector::collect_crate_mono_items::h353c8d9ad96cacce

25: 0x7fff27707ef0 - rustc_mir::monomorphize::partitioning::compute_codegen_unit_name::h5212d0f143645fd4

26: 0x7fff27854537 - <:meth::virtualindex as core::fmt::debug>::fmt::he98a319022b78233

27: 0x7fff278324f3 - <:mir::block:: rustc_codegen_ssa::mir::functioncx>>::codegen_panic_intrinsic::AssertIntrinsic as core::fmt::Debug>::fmt::hf03f9321433764a5

28: 0x7fff277d77d0 - <:coverageinfo::map::expressionregion as core::fmt::debug>::fmt::h6ac1c379b5cb3970

29: 0x7fff278145b3 - <:mir::block:: rustc_codegen_ssa::mir::functioncx>>::codegen_panic_intrinsic::AssertIntrinsic as core::fmt::Debug>::fmt::hf03f9321433764a5

30: 0x7fff278613c1 - rustc_codegen_ssa::back::symbol_export::crates_export_threshold::h701789d39c12c5bb

31: 0x7fff27a0a88e - rustc_plugin_impl::build::provide::h31aa2c45a0b2beac

32: 0x7fff27bd213e - ZN14rustc_metadata5rmeta7decoder17__ty_decoder_impl186_$LT$impl$u20$rustc_serialize..serialize..SpecializedDecoder$LT$$RF$rustc_middle..mir..interpret..allocation..Allocation$GT$$u20$for$u20$rustc_metadata..rmeta..decoder..DecodeContext$GT$18specialized_d

33: 0x7fff27be1b10 - ZN14rustc_metadata5rmeta7decoder17__ty_decoder_impl186_$LT$impl$u20$rustc_serialize..serialize..SpecializedDecoder$LT$$RF$rustc_middle..mir..interpret..allocation..Allocation$GT$$u20$for$u20$rustc_metadata..rmeta..decoder..DecodeContext$GT$18specialized_d

34: 0x7fff27b42987 - ::write_to_bytes_at::ha75ed890010d59b5

35: 0x7fff27a1d0c6 - <:rmeta::encoder::encodecontext as rustc_serialize::serialize::specializedencoder>>::specialized_encode::h27f2383a265888ea

36: 0x7fff27a2c9b2 - <:rmeta::encoder::prefetchvisitor as rustc_hir::itemlikevisit::paritemlikevisitor>::visit_impl_item::h41f95b5bba7b4361

37: 0x7fff27acc6cd - rustc_metadata::dynamic_lib::DynamicLibrary::open::hd9e07ef0fa8b5dfe

38: 0x7fff27bf3e62 - rustc_metadata::rmeta::decoder::cstore_impl::::encode_metadata::h5b49c2aa9357f24e

39: 0x7fff28702bce - rustc_middle::ty::context::TyCtxt::encode_metadata::he08193cbd631d4ff

40: 0x7fff24a348bf - rustc_interface::passes::BoxedResolver::to_resolver_outputs::h1d6186a99825b11e

41: 0x7fff24961176 - rustc_interface::queries::Queries::ongoing_codegen::h43c89a54be4efc35

42: 0x7fff246d40e3 - <:infer::canonical::canonicalizer::canonicalizer as rustc_middle::ty::fold::typefolder>::tcx::h4ddcddb18f09f250

43: 0x7fff2469aa7c - <:default_hook as core::ops::deref::deref>::deref::h75f1e721d5dee9b1

44: 0x7fff246d609c - <:infer::canonical::canonicalizer::canonicalizer as rustc_middle::ty::fold::typefolder>::tcx::h4ddcddb18f09f250

45: 0x7fff246c1fb0 - <:sparse::sparseset as core::ops::deref::deref>::deref::hcab2bfd369f1a834

46: 0x7fff246c4989 - <:sparse::sparseset as core::ops::deref::deref>::deref::hcab2bfd369f1a834

47: 0x7fff24679953 - <:prefilter::rarebyteoffset as core::default::default>::default::hd78c1f669c18c07d

48: 0x7fff5d92ee4a - std::sys::windows::thread::Thread::new::h84550e08827b3a3a

49: 0x7fffdb216fd4 - BaseThreadInitThunk

50: 0x7fffdccbcec1 - RtlUserThreadStart

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.47.0-nightly (8e21bd063 2020-08-14) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 --crate-type lib

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

query stack during panic:

#0 [optimized_mir] optimizing MIR for `proc::validator::Validator::validate`

#1 [collect_and_partition_mono_items] collect_and_partition_mono_items

#2 [exported_symbols] exported_symbols

end of query stack

error: could not compile `naga`.

Caused by:

process didn't exit successfully: `rustc --crate-name naga --edition=2018 C:\Users\Chris\.cargo\git\checkouts\naga-dbb2b19faed49210\1eb6370\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C debuginfo=2 --cfg "feature=\"default\"" -C metadata=b78cb55e6bbf7f02 -C extra-filename=-b78cb55e6bbf7f02 --out-dir C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps -L dependency=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps --extern bitflags=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libbitflags-b3aa381b8c8a158c.rmeta --extern fxhash=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libfxhash-abd942eca949d6c8.rmeta --extern log=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\liblog-5edde9ce5ee6a1cc.rmeta --extern num_traits=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libnum_traits-55b459a906b3f58a.rmeta --extern thiserror=C:\Users\Chris\Development\ice-test-2020-08-15\target\debug\deps\libthiserror-cd69ea1eee32f495.rmeta --cap-lints allow` (exit code: 101)

 类似资料: