]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-31173.rs
Merge commit '2ca58e7dda4a9eb142599638c59dc04d15961175' into clippyup
[rust.git] / src / test / ui / issues / issue-31173.rs
1 use std::vec::IntoIter;
2
3 pub fn get_tok(it: &mut IntoIter<u8>) {
4     let mut found_e = false;
5
6     let temp: Vec<u8> = it.take_while(|&x| {
7         found_e = true;
8         false
9     })
10         .cloned()
11         //~^ ERROR type mismatch resolving
12         //~| expected type `u8`
13         //~| found reference `&_`
14         .collect(); //~ ERROR no method named `collect`
15 }
16
17 fn main() {}