mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			355 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			355 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // build-fail
 | |
| // compile-flags: -Copt-level=0
 | |
| // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
 | |
| //~^^^ ERROR overflow evaluating the requirement
 | |
| 
 | |
| fn main() {
 | |
|     let mut iter = 0u8..1;
 | |
|     func(&mut iter)
 | |
| }
 | |
| 
 | |
| fn func<T: Iterator<Item = u8>>(iter: &mut T) { //~ WARN function cannot return without recursing
 | |
|     func(&mut iter.map(|x| x + 1))
 | |
| }
 | 
