error[E0601]: main function not found error[E0627]: yield statement outside of generator literal --> $DIR/yield-in-static.rs:13:18 | 13 | static B: 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"