Created
September 20, 2015 20:15
-
-
Save anonymous/4c85bcab2cf9f8c56dc2 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait TR { | |
type Assoc : Clone + Copy + Default; | |
} | |
#[derive(Clone, Copy, Default)] | |
struct Foo<T: TR> { | |
thing : T::Assoc, | |
} | |
impl <T: TR> Foo<T> { | |
fn bar() { | |
// This works | |
let _ : T::Assoc = Default::default(); | |
// This does not. | |
let _ : Foo<T> = Default::default(); | |
} | |
} | |
fn main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment