mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			257 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			257 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // check-pass
 | |
| fn iter<'a>(data: &'a [usize]) -> impl Iterator<Item = usize> + 'a {
 | |
|     data.iter()
 | |
|         .map(
 | |
|             |x| x // fn(&'a usize) -> &'a usize
 | |
|         )
 | |
|         .map(
 | |
|             |x| *x // fn(&'a usize) -> usize
 | |
|         )
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
| }
 | 
