Skip to content

Prusti reported an internal error when analyzing a closure example #1528

@soyo114

Description

@soyo114

Description

Prusti throws an internal error when analyze the following code, it seems that the root cause is related to the Rust closure.

fn main() {
    let c = |x,y| x * y; 
    let result = c(5,6);
}

internal error:

thread 'rustc' panicked at prusti-viper/src/encoder/procedure_encoder.rs:3406:57:
called `Option::unwrap()` on a `None` value

To Reproduce

Use the following command:

cargo prusti

Environment

Prusti version: 0.2.2, commit 0d4a8d4 2024-03-26 13:08:03 UTC,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions