Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #137 from babbageclunk/25810
Browse files Browse the repository at this point in the history
25810
  • Loading branch information
steveklabnik committed Nov 6, 2015
2 parents a21f75d + 5c8af63 commit c52eeac
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/25810.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

fn main() {
let x = X(15);
let y = x.foo();
println!("{:?}",y);
}

trait Foo {
fn foo<'a>(&'a self) -> <&'a Self as Bar>::Output;
}

trait Bar {
type Output;
}

struct X(i32);

impl<'a> Bar for &'a X {
type Output = &'a i32;
}

impl Foo for X {
fn foo<'a>(&'a self) -> <&'a Self as Bar>::Output {
&self.0
}
}

0 comments on commit c52eeac

Please sign in to comment.