mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			213 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			213 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| 
 | |
| struct A;
 | |
| 
 | |
| impl A {
 | |
|     const fn banana() -> bool {
 | |
|         true
 | |
|     }
 | |
| }
 | |
| 
 | |
| const ABANANA: bool = A::banana();
 | |
| 
 | |
| fn main() {
 | |
|     match true {
 | |
|         ABANANA => {},
 | |
|         _ => panic!("what?")
 | |
|     }
 | |
| }
 | 
