We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
This compiles:
fn isum<'a, I: Iterator<&'a int>>(mut it: I) -> int { it.fold(0, |a, b| a + *b) }
This should be the same, but doesn't compile:
fn isum<I: Iterator<&int>>(mut it: I) -> int { it.fold(0, |a, b| a + *b)}
The compiler complains of a "missing lifetime specifier" at the &int.