mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			174 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			174 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// run-pass
 | 
						|
 | 
						|
trait Foo {
 | 
						|
    fn foo(self);
 | 
						|
}
 | 
						|
 | 
						|
impl<'a> Foo for &'a [isize] {
 | 
						|
    fn foo(self) {}
 | 
						|
}
 | 
						|
 | 
						|
pub fn main() {
 | 
						|
    let items = vec![ 3, 5, 1, 2, 4 ];
 | 
						|
    items.foo();
 | 
						|
}
 |