mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			277 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			277 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ check-pass
 | 
						|
 | 
						|
#![feature(type_alias_impl_trait)]
 | 
						|
 | 
						|
trait SuperExpectation: Fn(i32) {}
 | 
						|
 | 
						|
impl<T: Fn(i32)> SuperExpectation for T {}
 | 
						|
 | 
						|
type Foo = impl SuperExpectation;
 | 
						|
 | 
						|
#[define_opaque(Foo)]
 | 
						|
fn bop() {
 | 
						|
    let _: Foo = |x| {
 | 
						|
        let _ = x.to_string();
 | 
						|
    };
 | 
						|
}
 | 
						|
 | 
						|
fn main() {}
 |