mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| //@ proc-macro: append-impl.rs
 | |
| 
 | |
| #![allow(warnings)]
 | |
| 
 | |
| #[macro_use]
 | |
| extern crate append_impl;
 | |
| 
 | |
| trait Append {
 | |
|     fn foo(&self);
 | |
| }
 | |
| 
 | |
| #[derive(PartialEq,
 | |
|          Append,
 | |
|          Eq)]
 | |
| struct A {
 | |
|     inner: u32,
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     A { inner: 3 }.foo();
 | |
| }
 | 
