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

ICE: broken MIR #109608

Closed
DougAnderson444 opened this issue Mar 25, 2023 · 3 comments
Closed

ICE: broken MIR #109608

DougAnderson444 opened this issue Mar 25, 2023 · 3 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@DougAnderson444
Copy link

I was just scaffolding a new project in a cargo workspace, when I got this error (note that cargo check ran just fine)

Code

use str0m::change::SdpStrategy;
use str0m::{Candidate, RtcError};

pub fn say_hello() {
    println!("Hello, world!");
}

pub fn create_sdp_offer() {}

Meta

rustc --version --verbose:

rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-pc-windows-msvc
release: 1.67.0
LLVM version: 15.0.6

Error output

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3469 ~ combine[c418]::stream::{impl#47}::reset), const_param_did: None }) (after phase change to runtime-optimized) at bb0[2]:
                                encountered `Assign((_0, const Result::<(), StringStreamError>::Ok(())))` with incompatible types:
                                left-hand side has type: Result<(), <&str as StreamOnce>::Error>
                                right-hand side has type: Result<(), StringStreamError>
   --> C:\Users\douga\.cargo\registry\src\github.com-1ecc6299db9ec823\combine-4.6.6\src\stream\mod.rs:44:17
    |
44  |                 Ok(())
    |                 ^^^^^^
...
153 | clone_resetable! {('a) &'a str}
    | ------------------------------- in this macro invocation
    |
    = note: delayed at   
Backtrace

   Compiling combine v4.6.6
   Compiling str0m v0.1.0 (https://github.com/algesten/str0m.git#c52ec951)
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:3469 ~ combine[c418]::stream::{impl#47}::reset), const_param_did: None }) (after phase change to runtime-optimized) at bb0[2]:
                                encountered `Assign((_0, const Result::<(), StringStreamError>::Ok(())))` with incompatible types:
                                left-hand side has type: Result<(), <&str as StreamOnce>::Error>
                                right-hand side has type: Result<(), StringStreamError>
   --> C:\Users\douga\.cargo\registry\src\github.com-1ecc6299db9ec823\combine-4.6.6\src\stream\mod.rs:44:17
    |
44  |                 Ok(())
    |                 ^^^^^^
...
153 | clone_resetable! {('a) &'a str}
    | ------------------------------- in this macro invocation
    |
    = note: delayed at    0: std::backtrace::Backtrace::disabled
               1: std::backtrace::Backtrace::force_capture
               2: <rustc_errors::HandlerInner>::emit_diagnostic
               3: rustc_const_eval::const_eval::fn_queries::is_parent_const_impl_raw
               4: <rustc_const_eval::transform::promote_consts::Candidate as core::fmt::Debug>::fmt
               5: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
               6: <rustc_mir_transform::ctfe_limit::CtfeLimit as rustc_middle::mir::MirPass>::run_pass
               7: <rustc_mir_transform::generator::StateTransform as rustc_middle::mir::MirPass>::run_pass
               8: <rustc_middle::ty::Visibility as rustc_privacy::VisibilityLike>::new_min
               9: <rustc_metadata::creader::CStore>::from_tcx
              10: rustc_metadata::rmeta::encoder::encode_metadata
              11: <rustc_metadata::rmeta::LazyTables as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
              12: rustc_metadata::rmeta::encoder::encode_metadata
              13: rustc_metadata::fs::encode_and_write_metadata
              14: rustc_interface::passes::start_codegen
              15: rustc_interface::passes::output_filenames
              16: <rustc_interface::queries::Queries>::ongoing_codegen
              17: rustc_driver_impl::args::arg_expand_all
              18: rustc_driver_impl::args::arg_expand_all
              19: <rustc_data_structures::temp_dir::MaybeTempDir>::new
              20: <rustc_data_structures::temp_dir::MaybeTempDir>::new
              21: std::sys::windows::thread::Thread::new
              22: BaseThreadInitThunk
              23: RtlUserThreadStart

    = note: this error: internal compiler error originates in the macro `clone_resetable` (in Nightly builds, run with -Z macro-backtrace for more info)

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.69.0-nightly (bd39bbb4b 2023-02-07) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
end of query stack
error: could not compile `combine`

@DougAnderson444 DougAnderson444 added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 25, 2023
@jyn514 jyn514 changed the title no errors encountered even though delay_span_bug issued ICE: broken MIR Mar 25, 2023
@jyn514
Copy link
Member

jyn514 commented Mar 25, 2023

                                left-hand side has type: Result<(), <&str as StreamOnce>::Error>
                                right-hand side has type: Result<(), StringStreamError>

looks like something in the compiler is failing to normalize the error type? nightly-2023-02-07 is somewhat old, @DougAnderson444 can you try again with latest nightly?

@lukas-code
Copy link
Contributor

This looks like #107678

@DougAnderson444
Copy link
Author

can you try again with latest nightly?

Yes of course, upgrading made this error disappear, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants