Skip to content

Compiler crashes if type includes self by value #8083

Closed
@stepancheg

Description

@stepancheg
pub struct DescriptorProto {
    nested_type: Option<DescriptorProto>,
}

fn foo() -> Option<DescriptorProto> {
    None
}

fn main() {}

Seems to crash with stack overflow. Should print nice message and gracefully shutdown.

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