//@ known-bug: #134175 //@compile-flags: -Zvalidate-mir -Zinline-mir=yes use std::vec::IntoIter; pub(crate) trait Foo: Iterator::Key> { type Key; } impl Foo for IntoIter {} fn sum_foo>(f: F) -> i32 { f.fold(0, |a, b| a + b) } fn main() { let x = sum_foo(vec![11, 10, 1].into_iter()); }