Skip to content

Segfault on Option<T> inside struct if T is non-pointer type and it's name equals to a struct name #9210

Closed
@bohdan-shulha

Description

@bohdan-shulha

Following code will result into segfault if you would try to run it;

struct Test {
    parent: Option<Test>
}

fn main() {
    let v = Test{ parent: None };
}
$ rust -v
rust 0.8-pre (4ecb0a3 2013-09-15 01:50:50 -0700)

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