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