Closed
Description
STR
fn test(it: &mut Iterator<Item=()>) {
for _ in it {}
}
fn main() {}
Output
for.rs:2:14: 2:16 error: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
for.rs:2 for _ in it {}
^~
for.rs:2:14: 2:16 error: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
for.rs:2 for _ in it {}
^~
for.rs:2:14: 2:16 error: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
for.rs:2 for _ in it {}
^~
for.rs:1:1: 3:2 help: consider using an explicit lifetime parameter as shown: fn test<'a>(it: &'a mut Iterator<Item = ()>)
for.rs:1 fn test(it: &mut Iterator<Item=()>) {
for.rs:2 for _ in it {}
for.rs:3 }
error: aborting due to 3 previous errors
Version
rustc 1.0.0-nightly (458a6a2f6 2015-01-25 21:20:37 +0000)