Skip to content

[ICE] Calling syntax on struct #46771

Closed
@leonardo-m

Description

@leonardo-m
fn main() {
    struct Foo;
    (1 .. 2).find(|_| Foo(0) == 0);
}

Gives:

error[E0618]: expected function, found `main::Foo`
 --> ...\test.rs:3:24
  |
3 |     (1 .. 2).find(|_| Foo(0) == 0);
  |                        ^^^^^^
  |
note: defined here
 --> ...\test.rs:2:5
  |
2 |     struct Foo;
  |     ^^^^^^^^^^^

error: internal compiler error: unexpected panic

note: rustc 1.24.0-nightly (77efd6800 2017-12-15) running on x86_64-pc-windows-gnu

thread 'rustc' panicked at 'LocalTableInContext: key not found', src\libcore\option.rs:891:4

Eventually we'll have to start fuzzying the Rustc compiler.

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