Skip to content

ICE using <T as Fn()>::call #39687

Closed
Closed
@arielb1

Description

@arielb1

Meta

rustc 1.17.0-nightly (c49d10207 2017-02-07)

STR

#![feature(fn_traits)]

fn main() {
    <fn() as Fn()>::call;
}

Expected Result

Code works

Actual Result

error: internal compiler error: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_typeck/check/mod.rs:4507: parenthesized parameters cannot appear in ExprPath
 --> <anon>:4:5
  |
4 |     <fn() as Fn()>::call;
  |     ^^^^^^^^^^^^^^^^^^^^

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

thread 'rustc' panicked at 'Box<Any>', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_errors/lib.rs:376
note: Run with `RUST_BACKTRACE=1` for a backtrace.

cc @eddyb

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions