]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type/issue-103271.rs
Update upstream source from tag 'upstream/1.67.1+dfsg1'
[rustc.git] / src / test / ui / type / issue-103271.rs
1 fn main() {
2 let iter_fun = <&[u32]>::iter;
3 //~^ ERROR no function or associated item named `iter` found for reference `&[u32]` in the current scope [E0599]
4 //~| function or associated item not found in `&[u32]`
5 //~| HELP the function `iter` is implemented on `[u32]`
6 for item in iter_fun(&[1,1]) {
7 let x: &u32 = item;
8 assert_eq!(x, &1);
9 }
10 let iter_fun2 = <(&[u32])>::iter;
11 //~^ no function or associated item named `iter` found for reference `&[u32]` in the current scope [E0599]
12 //~| function or associated item not found in `&[u32]`
13 //~| HELP the function `iter` is implemented on `[u32]`
14 for item2 in iter_fun2(&[1,1]) {
15 let x: &u32 = item2;
16 assert_eq!(x, &1);
17 }
18 }