mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			212 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			212 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// run-pass
 | 
						|
// aux-build:attr-on-trait.rs
 | 
						|
 | 
						|
extern crate attr_on_trait;
 | 
						|
 | 
						|
use attr_on_trait::foo;
 | 
						|
 | 
						|
trait Foo {
 | 
						|
    #[foo]
 | 
						|
    fn foo() {}
 | 
						|
}
 | 
						|
 | 
						|
impl Foo for i32 {
 | 
						|
    fn foo(&self) {}
 | 
						|
}
 | 
						|
 | 
						|
fn main() {
 | 
						|
    3i32.foo();
 | 
						|
}
 |