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 parenthetical trait notation in impls #19982

Closed
nikomatsakis opened this issue Dec 18, 2014 · 1 comment
Closed

ICE using parenthetical trait notation in impls #19982

nikomatsakis opened this issue Dec 18, 2014 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nikomatsakis
Copy link
Contributor

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.

@aturon aturon mentioned this issue Dec 18, 2014
47 tasks
nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Dec 19, 2014
lifetimes. This currently causes an ICE; it should (ideally) work, but
failing that at least give a structured error. For the purposes of
this PR, though, workaround is fine.
@kmcallister kmcallister added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 9, 2015
tamird added a commit to tamird/rust that referenced this issue Mar 16, 2015
@tamird
Copy link
Contributor

tamird commented Apr 21, 2015

Hey, this should have been closed by 3a93bdb! @steveklabnik would you mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants