Skip to content

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

@arielb1

Description

@arielb1
Contributor

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

Activity

added
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
on Feb 9, 2017
eminence

eminence commented on Dec 6, 2017

@eminence
Contributor

Bug triage: on current nightly (rustc 1.23.0-nightly (e97ba8328 2017-11-25)), this no longer is an ICE, but yields the following error:

error[E0229]: associated type bindings are not allowed here
 --> a.rs:4:16
  |
4 |     <fn() as Fn()>::call;
  |                ^^ associated type not allowed here

error: aborting due to previous error
added
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
and removed
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
on Dec 6, 2017
added a commit that references this issue on Jan 11, 2018
9649c4a
added 4 commits that reference this issue on Jan 11, 2018
4551f3a
5bd7d69
f589482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @kennytm@eminence@arielb1@Mark-Simulacrum

        Issue actions

          ICE using `<T as Fn()>::call` · Issue #39687 · rust-lang/rust