Skip to content

soundness holes in let #6225

Closed
Closed

Description

Related to #3235 because the same holes don't exist in match.

struct Foo {
    n: uint
}

impl Drop for Foo {
    fn finalize(&self) {
        for self.n.times {
            println("pew");
        }
    }
}

fn main() {
    let x = Foo{n: 5};
    let &_y = &x;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

A-destructorsArea: Destructors (`Drop`, …)A-typesystemArea: The type system

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions