summary refs log tree commit diff
path: root/src/test/auxiliary/issue2378b.rs
blob: 322ee2ed444e02ddd7cbb3e944c9030027110cbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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) {
        (self.a[idx], self.b[idx])
    }
}