Skip to content

ICE on completely bogus use of ref in closure parameter list #5239

Closed
@ben0x539

Description

@ben0x539

I was overly optimistic regarding rustc's current DWIM semantics, and rustc didn't even know how to exhaustively describe my stupidity.

foo.rs:1:22: 1:28 error: the type of this value must be known in this context
foo.rs:1 fn main() { |ref x| { x += 1; }; }
                               ^~~~~~
error: internal compiler error: no type for node 9: expr 1 (id=9) in fcx 7f86d428df40

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.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