mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| //@ proc-macro: attr-args.rs
 | |
| 
 | |
| #![allow(warnings)]
 | |
| 
 | |
| extern crate attr_args;
 | |
| use attr_args::{attr_with_args, identity};
 | |
| 
 | |
| #[attr_with_args(text = "Hello, world!")]
 | |
| fn foo() {}
 | |
| 
 | |
| #[identity(fn main() { assert_eq!(foo(), "Hello, world!"); })]
 | |
| struct Dummy;
 | 
