error: invalid label name `'static` --> $DIR/issue-52437.rs:2:13 | LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ^^^^^^^ error[E0658]: `loop` is not allowed in a `const` --> $DIR/issue-52437.rs:2:13 | LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #52000 for more information = help: add `#![feature(const_loop)]` to the crate attributes to enable error[E0282]: type annotations needed --> $DIR/issue-52437.rs:2:30 | LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ^ consider giving this closure parameter a type 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 4 previous errors Some errors have detailed explanations: E0282, E0308, E0658. For more information about an error, try `rustc --explain E0282`.