mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 21:16:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			204 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			204 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![feature(coroutines, stmt_expr_attributes)]
 | |
| 
 | |
| fn main() {
 | |
|     let _ = #[coroutine]
 | |
|     || {
 | |
|         *(1 as *mut u32) = 42;
 | |
|         //~^ ERROR dereference of raw pointer is unsafe
 | |
|         yield;
 | |
|     };
 | |
| }
 | 
