mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
33 lines
445 B
Rust
33 lines
445 B
Rust
//@ check-pass
|
|
|
|
trait Data {
|
|
type Elem;
|
|
}
|
|
|
|
impl<F, S: Data<Elem = F>> Data for ArrayBase<S> {
|
|
type Elem = F;
|
|
}
|
|
|
|
struct DatasetIter<'a, R: Data> {
|
|
data: &'a R::Elem,
|
|
}
|
|
|
|
pub struct ArrayBase<S> {
|
|
data: S,
|
|
}
|
|
|
|
trait Trait {
|
|
type Item;
|
|
fn next() -> Option<Self::Item>;
|
|
}
|
|
|
|
impl<'a, D: Data> Trait for DatasetIter<'a, ArrayBase<D>> {
|
|
type Item = ();
|
|
|
|
fn next() -> Option<Self::Item> {
|
|
None
|
|
}
|
|
}
|
|
|
|
fn main() {}
|