rust/src/test/ui/issues/issue-49556.rs
2019-07-03 06:30:28 +09:00

14 lines
294 B
Rust

// build-pass (FIXME(62277): could be check-pass?)
fn iter<'a>(data: &'a [usize]) -> impl Iterator<Item = usize> + 'a {
data.iter()
.map(
|x| x // fn(&'a usize) -> &'a usize
)
.map(
|x| *x // fn(&'a usize) -> usize
)
}
fn main() {
}