2012-12-10 19:32:48 -06:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2013-04-18 16:48:59 -05:00
|
|
|
#[link (name = "issue2378b")];
|
|
|
|
#[crate_type = "lib"];
|
|
|
|
|
|
|
|
extern mod issue2378a;
|
2012-05-14 00:12:58 -05:00
|
|
|
|
2012-09-05 14:32:05 -05:00
|
|
|
use issue2378a::maybe;
|
2012-05-14 00:12:58 -05:00
|
|
|
|
2013-08-07 02:11:34 -05:00
|
|
|
pub struct two_maybes<T> {a: maybe<T>, b: maybe<T>}
|
2012-05-14 00:12:58 -05:00
|
|
|
|
2013-07-02 14:47:32 -05:00
|
|
|
impl<T:Clone> Index<uint,(T,T)> for two_maybes<T> {
|
2013-04-18 16:48:59 -05:00
|
|
|
fn index(&self, idx: &uint) -> (T, T) {
|
|
|
|
(self.a[*idx], self.b[*idx])
|
2012-05-14 00:12:58 -05:00
|
|
|
}
|
2013-02-14 13:47:00 -06:00
|
|
|
}
|