diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-31173.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-31173.rs b/src/test/ui/issues/issue-31173.rs new file mode 100644 index 000000000..48061ae54 --- /dev/null +++ b/src/test/ui/issues/issue-31173.rs @@ -0,0 +1,15 @@ +use std::vec::IntoIter; + +pub fn get_tok(it: &mut IntoIter<u8>) { + let mut found_e = false; + + let temp: Vec<u8> = it.take_while(|&x| { + found_e = true; + false + }) + .cloned() + //~^ ERROR type mismatch resolving + .collect(); //~ ERROR the method +} + +fn main() {} |