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

Use impl header lifetime elision in generated impls for '&' and '&mut' once stable #22

Closed
LukasKalbertodt opened this issue Jul 25, 2018 · 3 comments
Assignees

Comments

@LukasKalbertodt
Copy link
Member

LukasKalbertodt commented Jul 25, 2018

Just a reminder: once lifetime elision in impl headers (see tracking issue) is stable, the generated code should use that feature. So instead of:

impl<'a, T> Foo for &'a T {}

It will be (at least I think that's the syntax):

impl<T> Foo for &T {}

Same for &mut.

This does matter as the generated code ends up in the docs. And we want that code to be as idiomatic as possible.

@LukasKalbertodt LukasKalbertodt self-assigned this Oct 2, 2018
@LukasKalbertodt LukasKalbertodt changed the title Use in-band lifetimes in generated impls for '&' and '&mut' once stable Use impl header lifetime elision in generated impls for '&' and '&mut' once stable Oct 2, 2018
@scottmcm
Copy link

scottmcm commented Oct 3, 2018

Yes, that's correct. There's a bunch of examples from libcore in PR rust-lang/rust#54687.

@LukasKalbertodt
Copy link
Member Author

@scottmcm Thanks for creating the stabilization for 2015 PR <3
Then, I can finally implement this issue.

@LukasKalbertodt
Copy link
Member Author

As discussed in #44 implementing this is probably not really worth it. I will close this issue for now. If someone thinks this issue is absolutely worth solving, we can reopen.

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

No branches or pull requests

2 participants