]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/closure-no-fn-5.rs
Rollup merge of #106836 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / 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 }