Skip to content

Compiling https://github.com/Marwes/combine with 2023-02-05 nightly causes internal compiler error #107716

Closed
@jqnatividad

Description

@jqnatividad

This was encountered in my project's daily Github Action to compile using the latest Rust nightly.

Compiling combine v4.6.6
[822](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:823)
     Running `rustc --crate-name combine --edition=2018 /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/combine-4.6.6/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="alloc"' --cfg 'feature="bytes"' --cfg 'feature="std"' -C metadata=9b5bc18b053dbbc5 -C extra-filename=-9b5bc18b053dbbc5 --out-dir /home/runner/work/qsv/qsv/target/debug/deps -L dependency=/home/runner/work/qsv/qsv/target/debug/deps --extern bytes=/home/runner/work/qsv/qsv/target/debug/deps/libbytes-1fe4720935a13e80.rmeta --extern memchr=/home/runner/work/qsv/qsv/target/debug/deps/libmemchr-4fce41623cec2314.rmeta --cap-lints allow -C 'link-args=-Wl,-rpath,$ORIGIN'`
[823](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:824)
error: internal compiler error: no errors encountered even though `delay_span_bug` issued
[824](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:825)

[825](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:826)
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3469 ~ combine[43ed]::stream::{impl#47}::reset), const_param_did: None }) (after phase change to runtime-optimized) at bb0[2]:
[826](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:827)
                                encountered `Assign((_0, const Result::<(), StringStreamError>::Ok(())))` with incompatible types:
[827](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:828)
                                left-hand side has type: Result<(), <&str as StreamOnce>::Error>
[828](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:829)
                                right-hand side has type: Result<(), StringStreamError>
[829](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:830)
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/combine-4.6.6/src/stream/mod.rs:44:17
[830](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:831)
    |
[831](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:832)
44  |                 Ok(())
[832](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:833)
    |                 ^^^^^^
[833](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:834)
...
[834](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:835)
153 | clone_resetable! {('a) &'a str}
[835](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:836)
    | ------------------------------- in this macro invocation
[836](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:837)
    |
[837](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:838)
    = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
[838](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:839)
               1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &alloc::string::String>
[839](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:840)
               2: <rustc_const_eval::transform::validate::TypeChecker>::fail::<alloc::string::String>
[840](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:841)
               3: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
[841](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:842)
               4: rustc_mir_transform::optimized_mir
[842](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:843)
               5: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optimized_mir, rustc_query_impl::plumbing::QueryCtxt>
[843](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:844)
               6: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
[844](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:845)
               7: rustc_metadata::rmeta::encoder::encode_metadata_impl
[845](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:846)
               8: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
[846](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:847)
               9: rustc_metadata::rmeta::encoder::encode_metadata
[847](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:848)
              10: rustc_metadata::fs::encode_and_write_metadata
[848](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:849)
              11: rustc_interface::passes::start_codegen
[849](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:850)
              12: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorGuaranteed>>
[850](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:851)
              13: <rustc_interface::queries::Queries>::ongoing_codegen
[851](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:852)
              14: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
[852](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:853)
              15: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
[853](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:854)
              16: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
[854](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:855)
              17: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
[855](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:856)
              18: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[856](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:857)
              19: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
[857](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:858)
                         at /rustc/75a0be98f25a4b9de5afa0e15eb016e7f9627032/library/alloc/src/boxed.rs:1988:9
[858](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:859)
              20: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
[859](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:860)
                         at /rustc/75a0be98f25a4b9de5afa0e15eb016e7f9627032/library/alloc/src/boxed.rs:1988:9
[860](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:861)
              21: std::sys::unix::thread::Thread::new::thread_start
[861](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:862)
                         at /rustc/75a0be98f25a4b9de5afa0e15eb016e7f9627032/library/std/src/sys/unix/thread.rs:108:17
[862](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:863)
              22: <unknown>
[863](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:864)
              23: <unknown>
[864](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:865)
            
[865](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:866)
    = note: this error: internal compiler error originates in the macro `clone_resetable` (in Nightly builds, run with -Z macro-backtrace for more info)
[866](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:867)

[867](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:868)
note: the compiler unexpectedly panicked. this is a bug.
[868](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:869)

[869](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:870)
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
[870](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:871)

[871](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:872)
note: rustc 1.69.0-nightly (75a0be98f 2023-02-05) running on x86_64-unknown-linux-gnu
[872](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:873)

[873](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:874)
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C link-args=-Wl,-rpath,$ORIGIN
[874](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:875)

[875](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:876)
note: some of the compiler flags provided by cargo are hidden
[876](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:877)

[877](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:878)
query stack during panic:
[878](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:879)
end of query stack
[879](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:880)
error: could not compile `combine`
[880](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:881)

[881](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:882)
Caused by:
[882](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:883)
  process didn't exit successfully: `rustc --crate-name combine --edition=2018 /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/combine-4.6.6/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="alloc"' --cfg 'feature="bytes"' --cfg 'feature="std"' -C metadata=9b5bc18b053dbbc5 -C extra-filename=-9b5bc18b053dbbc5 --out-dir /home/runner/work/qsv/qsv/target/debug/deps -L dependency=/home/runner/work/qsv/qsv/target/debug/deps --extern bytes=/home/runner/work/qsv/qsv/target/debug/deps/libbytes-1fe4720935a13e80.rmeta --extern memchr=/home/runner/work/qsv/qsv/target/debug/deps/libmemchr-4fce41623cec2314.rmeta --cap-lints allow -C 'link-args=-Wl,-rpath,$ORIGIN'` (exit status: 101)
[883](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:884)
warning: build failed, waiting for other jobs to finish...
[884](https://github.com/jqnatividad/qsv/actions/runs/4100323952/jobs/7071045400#step:6:885)
Error: Process completed with exit code 101.

More details can be found here -

https://github.com/jqnatividad/qsv/actions/runs/4100323952

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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions