Skip to content

Add check to prevent recursive unsized types #215

@edg-l

Description

@edg-l
mod foo {
    struct Foo {
        _: Foo,
    }

    #[intrinsic = "sizeof"]
    fn sizeof<T>() -> u64;

    pub fn main() -> i32 {
        sizeof::<Foo>();

        return 0;
    }
}

Currently overflows the stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions