]> git.proxmox.com Git - rustc.git/blob - src/test/ui/closures/closure-no-fn-5.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / closures / closure-no-fn-5.rs
1 // When providing diagnostics about not being able to coerce a capturing-closure
2 // to fn type, we want to report only upto 4 captures.
3
4 fn main() {
5 let a = 0u8;
6 let b = 0u8;
7 let c = 0u8;
8 let d = 0u8;
9 let e = 0u8;
10 let bar: fn() -> u8 = || { a; b; c; d; e };
11 //~^ ERROR mismatched types
12 }