]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-31173.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-31173.rs
CommitLineData
5bcae85e 1use std::vec::IntoIter;
223e47cc 2
5bcae85e
SL
3pub fn get_tok(it: &mut IntoIter<u8>) {
4 let mut found_e = false;
223e47cc 5
5bcae85e
SL
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`
60c5eb7d 13 //~| found reference `&_`
5869c6ff 14 .collect(); //~ ERROR the method
9cc50fc6 15}
5bcae85e
SL
16
17fn main() {}