Skip to content

Simplify #[derive(BuiltinTrait)] expansion wrt. lifetimes #61876

Description

@Centril

For example, given:

#[derive(Clone)]
struct A<'a>(&'a u8);

we generate:

impl<'a> Clone for A<'a> { ... }

but we should be able to generate:

impl Clone for A<'_> { ... }

This might lead to perf improvements by generating less tokens.

cc @zackmdavis @scottmcm @eddyb @petrochenkov
cc #61824

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-proc-macrosArea: Procedural macrosC-enhancementCategory: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions