Skip to content

Parse multiple bounding lifetimes in where clauses #20049

Closed
@jroesch

Description

@jroesch

My current patch only accepts a single bound (i.e 'a : 'b), we should fully generalize this to accept multiple liftetime bounds like 'a : 'b + 'c. This should be a very easy change, at a high level:

  • modify the parser to invoke self.parse_lifetimes(token::BinOp(token::Plus)) instead of self.parse_lifetime()
  • modify the WhereRegionPredicate type to accept a list of bounds instead of a single one
  • loop over the bounds creating a RegionOutlives constraint for each

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions