Created
October 15, 2013 19:13
-
-
Save zokier/6997067 to your computer and use it in GitHub Desktop.
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
test.rs:20:12: 20:18 error: type `&~A:Send` does not implement any method in scope named `a` | |
test.rs:20 a.a(); | |
^~~~~~ | |
error: aborting due to previous error | |
task '<unnamed>' failed at 'explicit failure', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:98 | |
task '<unnamed>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/rustc.rs:391 |
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 A { | |
fn a(); | |
} | |
struct B; | |
impl A for B { | |
fn a() { | |
println!("a()"); | |
} | |
} | |
struct C { | |
av: ~[~A] | |
} | |
impl C { | |
fn process(&self) { | |
for a in self.av.iter() { | |
a.a(); | |
} | |
} | |
} | |
fn main() { | |
let c = C { av: ~[~B as ~A] }; | |
c.process(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment