rust/tests/ui/methods/issues/issue-94581.rs
2023-01-11 09:32:08 +00:00

8 lines
138 B
Rust

fn get_slice() -> &'static [i32] {
&[1, 2, 3, 4]
}
fn main() {
let sqsum = get_slice().map(|i| i * i).sum(); //~ ERROR [E0599]
}