1
Fork 0

Account for type params with bounds

This commit is contained in:
Esteban Küber 2020-04-05 12:32:34 -07:00
parent 794b644f0b
commit c85fde126e
3 changed files with 30 additions and 6 deletions

View file

@ -24,6 +24,14 @@ fn baz(t: impl std::fmt::Debug, constraints: impl Iterator) {
}
}
fn bat<T: std::fmt::Debug>(t: T, constraints: impl Iterator) {
for constraint in constraints {
qux(t);
qux(constraint);
//~^ ERROR `<impl Iterator as std::iter::Iterator>::Item` doesn't implement `std::fmt::Debug`
}
}
fn qux(_: impl std::fmt::Debug) {}
fn main() {}