rust/tests/ui/traits/new-solver/dont-elaborate-for-projections.rs

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

13 lines
231 B
Rust
Raw Normal View History

// compile-flags: -Ztrait-solver=next
// check-pass
trait Iter<'a, I: 'a>: Iterator<Item = &'a I> {}
fn needs_iter<'a, T: Iter<'a, I> + ?Sized, I: 'a>(_: &T) {}
fn test(x: &dyn Iter<'_, ()>) {
needs_iter(x);
}
fn main() {}