Skip to content

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

Closed
@LukasKalbertodt

Description

@LukasKalbertodt

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.

Activity

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[/+] on Oct 2, 2018
scottmcm

scottmcm commented on Oct 3, 2018

@scottmcm

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

LukasKalbertodt

LukasKalbertodt commented on Oct 3, 2018

@LukasKalbertodt
MemberAuthor

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

LukasKalbertodt

LukasKalbertodt commented on Mar 24, 2019

@LukasKalbertodt
MemberAuthor

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @LukasKalbertodt@scottmcm

      Issue actions

        Use impl header lifetime elision in generated impls for '&' and '&mut' once stable · Issue #22 · auto-impl-rs/auto_impl