mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			299 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			299 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ edition: 2024
 | |
| 
 | |
| #![feature(rustc_attrs)]
 | |
| #![allow(internal_features)]
 | |
| #![rustc_variance_of_opaques]
 | |
| 
 | |
| use std::ops::Deref;
 | |
| 
 | |
| fn foo(x: Vec<i32>) -> Box<dyn for<'a> Deref<Target = impl ?Sized>> { //~ ERROR ['a: o]
 | |
|     //~^ ERROR cannot capture higher-ranked lifetime
 | |
|     Box::new(x)
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
