]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-31173.rs
Auto merge of #100251 - compiler-errors:tuple-trait-2, r=jackh726
[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
7         //~^ ERROR to be an iterator that yields `&_`, but it yields `u8`
8         .take_while(|&x| {
9             found_e = true;
10             false
11         })
12         .cloned()
13         .collect(); //~ ERROR the method
14 }
15
16 fn main() {}