Skip to content

Instantly share code, notes, and snippets.

@alexreg alexreg/desugared-2.rs
Last active Mar 7, 2019

Embed
What would you like to do?
associated type bounds in traits
trait Foo where <Self::Bar as Iterator>: Send {
type Bar: Iterator;
}
impl Foo for () {
type Bar = Iteerator<Item = ()>;
}
trait Foo {
type Bar: Iterator<Item = _0>;
type _0: Send;
}
impl Foo for () {
type Bar = Iterator<Item = _0>;
type _0 = ();
}
trait Foo {
type Bar: Iterator<Item: Send>;
}
impl Foo for () {
type Bar = Iterator<Item = ()>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.