mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			259 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			259 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| // needs-unwind
 | |
| // aux-build:expand-with-a-macro.rs
 | |
| 
 | |
| 
 | |
| #![deny(warnings)]
 | |
| 
 | |
| #[macro_use]
 | |
| extern crate expand_with_a_macro;
 | |
| 
 | |
| use std::panic;
 | |
| 
 | |
| #[derive(A)]
 | |
| struct A;
 | |
| 
 | |
| fn main() {
 | |
|     assert!(panic::catch_unwind(|| {
 | |
|         A.a();
 | |
|     }).is_err());
 | |
| }
 | 
