mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			318 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			318 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ build-pass (FIXME(62277): could be check-pass?)
 | 
						|
 | 
						|
trait ConstDefault {
 | 
						|
    const DEFAULT: Self;
 | 
						|
}
 | 
						|
 | 
						|
trait Foo: Sized {}
 | 
						|
 | 
						|
trait FooExt: Foo {
 | 
						|
    type T: ConstDefault;
 | 
						|
}
 | 
						|
 | 
						|
trait Bar<F: FooExt> {
 | 
						|
    const T: F::T;
 | 
						|
}
 | 
						|
 | 
						|
impl<F: FooExt> Bar<F> for () {
 | 
						|
    const T: F::T = <F::T as ConstDefault>::DEFAULT;
 | 
						|
}
 | 
						|
 | 
						|
fn main() {}
 |