rust-lang / rust-lang/rfcs

Amend RFC #195 to clarify associated lifetime syntax

Open
#1,225 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-lang
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

Per rust-lang/rust#17842, this will probably turn all lifetime identifiers into lifetime paths preceded by '. As a concrete example:

struct Bar<'r>(...);

trait Foo {
    lifetime 'a;
    lifetime 'b: 'Self::a = 'Self::a;

    fn foo(&'Self::a self) -> Bar<'Self::b>;
}

impl<'a> Foo for &'a i32 {
    lifetime 'a = 'a;
    lifetime 'b = 'static;

    fn foo(&'a self) -> Bar<'static> { ... }
}

fn baz<'b, F, G>(f: &F, g: &G) where
    F: Foo,
    G: Foo<'a = 'F::a>,
    'F::a: 'b,
{
...
}

CC @aturon.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading RFC #195 and rust-lang/rust#17842, then compare their lifetime syntax with the examples in this issue. The work is done when RFC #195 clearly specifies the associated lifetime syntax and reflects the intended forms shown here.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.