mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			230 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			230 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// revisions: mir thir
 | 
						|
// [thir]compile-flags: -Z thir-unsafeck
 | 
						|
 | 
						|
#![feature(coroutines)]
 | 
						|
 | 
						|
fn main() {
 | 
						|
    let _ = || {
 | 
						|
        *(1 as *mut u32) = 42;
 | 
						|
        //~^ ERROR dereference of raw pointer is unsafe
 | 
						|
        yield;
 | 
						|
    };
 | 
						|
}
 |