Skip to content

Elision lint should not do anything if trait refs are involved #296

Closed
@Manishearth

Description

@Manishearth

This is not always elidable, since it's possible to be &'a Trait + 'a too. Neither cases allow elision consistently, AFAICT.

fn foo<'a>(&'a self) -> &'a Trait {

}

walk_tying and searching for anything wrapping a trait except for a Box (TyUniq) should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesT-middleType: Probably requires verifiying types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions