rust/tests/ui/implied-bounds/implied_bounds_entailment_alias_var.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
445 B
Rust
Raw Normal View History

//@ 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() {}