mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			505 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			505 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // Basic testing for associated functions (in traits, trait impls & inherent impls).
 | |
| 
 | |
| //@ has assoc_fns/trait.Trait.html
 | |
| pub trait Trait {
 | |
|     //@ has - '//*[@id="tymethod.required"]' 'fn required(first: i32, second: &str)'
 | |
|     fn required(first: i32, second: &str);
 | |
| 
 | |
|     //@ has - '//*[@id="method.provided"]' 'fn provided(only: ())'
 | |
|     fn provided(only: ()) {}
 | |
| 
 | |
|     //@ has - '//*[@id="tymethod.params_are_unnamed"]' 'fn params_are_unnamed(_: i32, _: u32)'
 | |
|     fn params_are_unnamed(_: i32, _: u32);
 | |
| }
 | 
