Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
arielb1 opened this issue Feb 9, 2017 · 1 comment
Closed

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

arielb1 opened this issue Feb 9, 2017 · 1 comment
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@arielb1
Copy link
Contributor

arielb1 commented Feb 9, 2017

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

@arielb1 arielb1 added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Feb 9, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 22, 2017
@eminence
Copy link
Contributor

eminence commented Dec 6, 2017

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

@kennytm kennytm added E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. and removed I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Dec 6, 2017
topecongiro added a commit to topecongiro/rust that referenced this issue Jan 11, 2018
kennytm added a commit to kennytm/rust that referenced this issue Jan 11, 2018
kennytm added a commit to kennytm/rust that referenced this issue Jan 11, 2018
kennytm added a commit to kennytm/rust that referenced this issue Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

No branches or pull requests

4 participants