summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/issue-52437.stderr
blob: 38d9d08ce36ab4c2d6c0bd62cf44dbc7d1bee2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
error: invalid label name `'static`
  --> $DIR/issue-52437.rs:2:13
   |
LL |     [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
   |             ^^^^^^^

error[E0282]: type annotations needed
  --> $DIR/issue-52437.rs:2:30
   |
LL |     [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
   |                              ^
   |
help: consider giving this closure parameter an explicit type
   |
LL |     [(); &(&'static: loop { |x: _| {}; }) as *const _ as usize]
   |                               +++

error[E0308]: mismatched types
  --> $DIR/issue-52437.rs:2:5
   |
LL | fn main() {
   |           - expected `()` because of default return type
LL |     [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[(); _]`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0282, E0308.
For more information about an error, try `rustc --explain E0282`.