2023-09-19 16:19:06 -04:00
|
|
|
fn assert_all<F, T>(_f: F)
|
|
|
|
where
|
|
|
|
F: FnMut(&String) -> T,
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
fn id(x: &String) -> &String {
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_all::<_, &String>(id);
|
2024-01-11 13:02:50 +01:00
|
|
|
//~^ ERROR implementation of `FnMut` is not general enough
|
2023-09-19 16:19:06 -04:00
|
|
|
}
|