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

25810 #137

Merged
merged 1 commit into from
Nov 6, 2015
Merged

25810 #137

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}