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

Argument-position `impl Trait` requires a named lifetime #49287

Open
cramertj opened this Issue Mar 22, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@cramertj
Copy link
Member

cramertj commented Mar 22, 2018

This function produces an "expected lifetime parameter" error:

fn foo(_: impl Iterator<Item = &u8>) {}

This code should instead be accepted and bound the impl Trait parameter by the elided lifetime.

cc #34511

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Mar 23, 2018

In my opinion, we should accept '_, in-band lifetimes, and friends in where clauses as well. I'm not 100% sure whether this was controversial though, have to check.

@alexreg

This comment has been minimized.

Copy link
Contributor

alexreg commented Jan 28, 2019

Wait, was this fixed in #49251 or not?

@cramertj

This comment has been minimized.

Copy link
Member Author

cramertj commented Jan 29, 2019

Still generates an error for me on nightly.

@alexreg

This comment has been minimized.

Copy link
Contributor

alexreg commented Jan 29, 2019

@cramertj Hmm yes, I should have tried first, my bad. This is independent of the two return-position impl Trait lifetime-related bugs that you're fixing, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment