mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			470 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			470 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
 | 
						|
  --> $DIR/yield-in-static.rs:3:18
 | 
						|
   |
 | 
						|
LL | static B: u8 = { yield 3u8; 3u8};
 | 
						|
   |                  ^^^^^^^^^
 | 
						|
 | 
						|
error[E0627]: yield expression outside of coroutine literal
 | 
						|
  --> $DIR/yield-in-static.rs:3:18
 | 
						|
   |
 | 
						|
LL | static B: u8 = { yield 3u8; 3u8};
 | 
						|
   |                  ^^^^^^^^^
 | 
						|
 | 
						|
error: aborting due to 2 previous errors
 | 
						|
 | 
						|
For more information about this error, try `rustc --explain E0627`.
 |