Skip to content

bug: compilation panic: cairo-lang-lowering IndexMap: key not found #7095

@MagisterDallis

Description

@MagisterDallis

Bug Report

3e611b5
Cairo version:

Current behavior:
With the changes made in #7094, the code no longer compiles, and panics instead of succeeding (or failing) compilation.
I'm unsure what exactly causes the bug - will try to give a MRE when I can.

related code:

    #[inline]
    fn count<+Destruct<T>, +Destruct<Self::Item>>(
        self: T,
    ) -> usize {
        let mut self = self;
        Self::fold(ref self, 0_usize, |count, _x| {
            count + 1
        })
    }

panic trace:

thread '<unnamed>' panicked at crates/cairo-lang-lowering/src/db.rs:399:47:
IndexMap: key not found
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at crates/cairo-lang-lowering/src/db.rs:399:47:
IndexMap: key not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions