]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/issue-90871.stderr
Rollup merge of #106563 - clubby789:gce-macro-braces, r=TaKO8Ki
[rust.git] / tests / ui / closures / issue-90871.stderr
1 error[E0412]: cannot find type `n` in this scope
2   --> $DIR/issue-90871.rs:4:22
3    |
4 LL |     type_ascribe!(2, n([u8; || 1]))
5    |                      ^ help: a trait with a similar name exists: `Fn`
6   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
7    |
8    = note: similarly named trait `Fn` defined here
9
10 error[E0308]: mismatched types
11   --> $DIR/issue-90871.rs:4:29
12    |
13 LL |     type_ascribe!(2, n([u8; || 1]))
14    |                             ^^^^ expected `usize`, found closure
15    |
16    = note: expected type `usize`
17            found closure `[closure@$DIR/issue-90871.rs:4:29: 4:31]`
18 help: use parentheses to call this closure
19    |
20 LL |     type_ascribe!(2, n([u8; (|| 1)()]))
21    |                             +    +++
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0308, E0412.
26 For more information about an error, try `rustc --explain E0308`.