]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/issue-90871.stderr
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[rust.git] / src / test / ui / closures / issue-90871.stderr
1 error[E0412]: cannot find type `n` in this scope
2   --> $DIR/issue-90871.rs:2:8
3    |
4 LL |     2: n([u8; || 1])
5    |        ^ expecting a type here because of type ascription
6
7 error[E0308]: mismatched types
8   --> $DIR/issue-90871.rs:2:15
9    |
10 LL |     2: n([u8; || 1])
11    |               ^^^^ expected `usize`, found closure
12    |
13    = note: expected type `usize`
14            found closure `[closure@$DIR/issue-90871.rs:2:15: 2:17]`
15 help: use parentheses to call this closure
16    |
17 LL |     2: n([u8; (|| 1)()])
18    |               +    +++
19
20 error: aborting due to 2 previous errors
21
22 Some errors have detailed explanations: E0308, E0412.
23 For more information about an error, try `rustc --explain E0308`.