Skip to content

"LLVM ERROR: Broken function found" with UFCS and static methods #18539

Closed
@ghost

Description

struct Foo;

impl Foo {
    fn from_uint(x: uint) -> Foo {
        Foo
    }
}

fn main() {
    range(0u, 10).map(Foo::from_uint);
}

Out:

Function return type does not match operand type of return inst!
  ret void
 %"struct.Foo<[]>" = type {}LLVM ERROR: Broken function found, compilation aborted!

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions