rust/tests/ui/traits/next-solver/normalize/param-env-trait-candidate-1.rs

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

15 lines
330 B
Rust
Raw Normal View History

2023-12-07 18:34:40 -06:00
//@ check-pass
2023-12-14 06:11:28 -06:00
//@ compile-flags: -Znext-solver
2023-12-07 18:34:40 -06:00
// See https://github.com/rust-lang/trait-system-refactor-initiative/issues/1
// a minimization of a pattern in core.
fn next<T: Iterator<Item = U>, U>(t: &mut T) -> Option<U> {
t.next()
}
fn foo<T: Iterator>(t: &mut T) {
let _: Option<T::Item> = next(t);
}
fn main() {}