Skip to content

Instantly share code, notes, and snippets.

@stevenblenkinsop
Forked from anonymous/playground.rs
Created August 25, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenblenkinsop/1593c851770b3be36e30 to your computer and use it in GitHub Desktop.
Save stevenblenkinsop/1593c851770b3be36e30 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
trait T<'a> {
type A;
type Iter: Iterator<Item=Self::A>;
fn new() -> Self;
fn iter(&self) -> Self::Iter;
fn test() where Self: Sized {
let a = <Self as T<'a>>::new();
let _ = a.iter().map(|a| a);
}
}
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment