Skip to content

ICE: Broken MIR #72651

Closed
Closed
@Spanfile

Description

@Spanfile

EDIT: Here's MCVE: #72651 (comment)

Error:

error: internal compiler error: src/librustc_mir/transform/generator.rs:722: Broken MIR: generator contains type &util::human_version::HumanVersionReq in MIR, but typeck only knows about for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14> {std::future::ResumeTy, &'r factorio::mods::Mods<P>, &'s mod_common::Mod, std::vec::Vec<std::string::String>, impl std::future::Future, (), std::result::Result<std::vec::Vec<mod_common::dependency::Dependency>, anyhow::Error>, std::vec::Vec<mod_common::dependency::Dependency>, std::vec::IntoIter<mod_common::dependency::Dependency>, mod_common::dependency::Dependency, &'t1 mod_common::dependency::Dependency, mod_common::dependency::Requirement, &'t2 str, std::result::Result<&'t3 mod_common::Mod, anyhow::Error>, std::option::Option<util::human_version::HumanVersionReq>, util::human_version::HumanVersionReq, impl std::future::Future, log::Level, bool, [&'t5 str; 4], &'t6 [&'t7 str], &'t8 [&'t9 str; 4], impl std::future::Future, std::string::String, &'t11 std::string::String, [&'t12 str; 3], &'t13 [&'t14 str; 3]}
   --> crates/modtorio/src/factorio/mods.rs:266:38
    |
266 |       ) -> anyhow::Result<Vec<String>> {
    |  ______________________________________^
267 | |         let mut missing = Vec::new();
268 | |
269 | |         for dep in target_mod.dependencies().await? {
...   |
317 | |         Ok(missing)
318 | |     }
    | |_____^

thread 'rustc' panicked at 'Box<Any>', /rustc/a74d1862d4d87a56244958416fd05976c58ca1a8/src/libstd/macros.rs:13:23

Reproduce:

git clone https://github.com/Spanfile/Modtorio.git
cd Modtorio
git checkout bf757a3f710dd7af60b82e322790dddd77680483
cargo clippy
$ cargo clippy -V
clippy 0.0.212 (a74d186 2020-05-14)
$ cargo -V
cargo 1.45.0-nightly (cb06cb269 2020-05-08)
$ rustc -V
rustc 1.45.0-nightly (a74d1862d 2020-05-14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitA-coroutinesArea: CoroutinesAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions