mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			336 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			336 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| // revisions: mirunsafeck thirunsafeck
 | |
| // [thirunsafeck]compile-flags: -Z thir-unsafeck
 | |
| 
 | |
| #![allow(path_statements)]
 | |
| #![allow(dead_code)]
 | |
| 
 | |
| macro_rules! union {
 | |
|     () => (struct S;)
 | |
| }
 | |
| 
 | |
| union!();
 | |
| 
 | |
| fn union() {}
 | |
| 
 | |
| fn main() {
 | |
|     union();
 | |
| 
 | |
|     let union = 10;
 | |
| 
 | |
|     union;
 | |
| 
 | |
|     union as u8;
 | |
| 
 | |
|     union U {
 | |
|         a: u8,
 | |
|     }
 | |
| }
 | 
