mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			302 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			302 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ edition: 2024
 | |
| 
 | |
| #![feature(rustc_attrs)]
 | |
| #![feature(type_alias_impl_trait)]
 | |
| #![rustc_variance_of_opaques]
 | |
| 
 | |
| fn foo(x: &()) -> impl IntoIterator<Item = impl Sized> + use<> {
 | |
|     //~^ ERROR ['_: o]
 | |
|     //~| ERROR ['_: o]
 | |
|     //~| ERROR `impl Trait` captures lifetime parameter
 | |
|     [*x]
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
