-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Lifetime-polymorphic anonymous function causing compiler panic #30860
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
trait TypeWithLifetime<'a> {
type Type;
}
type At<'a,T> where T: TypeWithLifetime<'a> = T::Type;
fn main() {
let _ = |x:At<()>| false;
} |
The reduced example should fail to typecheck, I'd hope that my one actually would typecheck. |
Oh, you're right. I'm wondering if at least my example is caused by #21903 |
Some data. First off, I modified the test by removing the
At one point, I had modified the list closure to read
what all of this is pointing at is some errors around the late-bound lifetimes. The ICE in question may well arise due to getting the accounting wrong in trans, unclear. |
With |
The only remaining issue here is http://is.gd/xIgh8f, which I am treating as duplicate of #62529, the issue where I will try to track future instances of this field of ICE. Closing as fixed for the initial bug report, and duplicate for the related issue http://is.gd/xIgh8f |
The program at https://play.rust-lang.org/?gist=1a60fe4cd514848f6788 generates the following:
Reported on
#rust-lang
irc, @aturon reckons this is new, and should be filed with a mention of @nikomatsakis.The text was updated successfully, but these errors were encountered: