Skip to content

Amend RFC #195 to clarify associated lifetime syntax #1225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
apasel422 opened this issue Jul 27, 2015 · 1 comment
Open

Amend RFC #195 to clarify associated lifetime syntax #1225

apasel422 opened this issue Jul 27, 2015 · 1 comment
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.

Comments

@apasel422
Copy link
Contributor

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.

@nrc nrc added the T-lang Relevant to the language team, which will review and decide on the RFC. label Aug 25, 2016
@burdges
Copy link

burdges commented Apr 23, 2017

I take it nothing happened here yet? I presume the issues are similar to -> impl Trait in traits?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

3 participants