mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			221 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			221 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // check-pass
 | |
| 
 | |
| struct S;
 | |
| 
 | |
| impl PartialEq for S {
 | |
|     fn eq(&self, _: &S) -> bool {
 | |
|         true
 | |
|     }
 | |
| }
 | |
| 
 | |
| const fn equals_self<T: PartialEq>(t: &T) -> bool {
 | |
|     true
 | |
| }
 | |
| 
 | |
| pub const EQ: bool = equals_self(&S);
 | |
| 
 | |
| fn main() {}
 | 
