mirror of https://github.com/rust-lang/rust.git
30 lines
583 B
Rust
30 lines
583 B
Rust
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[next] compile-flags: -Znext-solver
|
|
//@ check-pass
|
|
|
|
// Make sure we prefer the `I::IntoIterator: Iterator<Item = ()>`
|
|
// where-bound over the `I::Intoiterator: Iterator<Item = I::Item>`
|
|
// alias-bound.
|
|
|
|
trait Iterator {
|
|
type Item;
|
|
}
|
|
|
|
trait IntoIterator {
|
|
type Item;
|
|
type IntoIter: Iterator<Item = Self::Item>;
|
|
}
|
|
|
|
fn normalize<I: Iterator<Item = ()>>() {}
|
|
|
|
fn foo<I>()
|
|
where
|
|
I: IntoIterator,
|
|
I::IntoIter: Iterator<Item = ()>,
|
|
{
|
|
normalize::<I::IntoIter>();
|
|
}
|
|
|
|
fn main() {}
|