Skip to content

type state doesn't handle closures properly #1965

Closed
@nikomatsakis

Description

@nikomatsakis

In the following test case:

fn test(-x: uint) {}

fn main() {
    let i = 3u;
    uint::range(0u, 10u) {|_x| test(i)}
}

the variable i is de-initialized multiple times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions