rust/src/test/auxiliary/issue2378b.rs

12 lines
239 B
Rust
Raw Normal View History

2012-05-14 00:12:58 -05:00
use issue2378a;
import issue2378a::maybe;
import issue2378a::methods;
type two_maybes<T> = {a: maybe<T>, b: maybe<T>};
impl methods<T:copy> for two_maybes<T> {
fn ~[](idx: uint) -> (T, T) {
2012-05-14 00:12:58 -05:00
(self.a[idx], self.b[idx])
}
}