Skip to content

ICE using parenthetical trait notation in impls  #19982

Description

@nikomatsakis

The following test will ICE:

#![feature(unboxed_closures)]
struct Foo;
impl Fn(&int) for Foo { }

The workaround for now is to write:

impl<'a> Fn(&'a int) for Foo { }

It would be better if this were implicit. This seems related to lifetime elision, which also is supposed to permit elided parameters in impls.

Activity

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

    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