error[E0601]: main function not found error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-const.rs:13:17 | 13 | const A: u8 = { yield 3u8; 3u8}; | ^^^^^^^^^ error: aborting due to 2 previous errors You've got a few errors: E0601, E0627 If you want more information on an error, try using "rustc --explain E0601"