Skip to content

Lifetime in trait method declaration affects RFC 1214 checks #27987

Closed as not planned
@eefriedman

Description

@eefriedman
trait Test {
    fn f<'a>(&self) where PartialEq<i32> : std::fmt::Display {}
}
trait Test2 {
    fn f<'a>(&self) where (PartialEq<i32> + 'a) : std::fmt::Display {}
}
fn main() {
}

Currently, Test1 triggers an "error", but Test2 doesn't. I would expect them to be treated the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lifetimesArea: Lifetimes / regionsA-trait-systemArea: Trait systemC-bugCategory: This is a bug.P-lowLow priorityT-langRelevant to the language teamT-typesRelevant to the types 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