]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/suggest-closure-return-type-2.stderr
Auto merge of #64925 - ehuss:document-json, r=Mark-Simulacrum
[rust.git] / src / test / ui / suggestions / suggest-closure-return-type-2.stderr
1 error[E0282]: type annotations needed for the closure `fn() -> [_; 0]`
2   --> $DIR/suggest-closure-return-type-2.rs:2:19
3    |
4 LL |     let _v = || { [] };
5    |                   ^^ cannot infer type
6 help: give this closure an explicit return type without `_` placeholders
7    |
8 LL |     let _v = || -> [_; 0] { [] };
9    |                 ^^^^^^^^^
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0282`.