mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
13 lines
305 B
Rust
13 lines
305 B
Rust
fn foo(items: &mut Vec<u8>) {
|
|
items.sort();
|
|
}
|
|
|
|
fn bar() -> impl Iterator<Item = i32> {
|
|
//~^ ERROR expected `foo` to be a fn item that returns `i32`, but it returns `()` [E0271]
|
|
let mut x: Vec<Vec<u8>> = vec![vec![0, 2, 1], vec![5, 4, 3]];
|
|
x.iter_mut().map(foo)
|
|
}
|
|
|
|
fn main() {
|
|
bar();
|
|
}
|