mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			195 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			195 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // Checks that `const fn` with const params can be used.
 | |
| //@ run-pass
 | |
| 
 | |
| const fn const_u32_identity<const X: u32>() -> u32 {
 | |
|     X
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     assert_eq!(const_u32_identity::<18>(), 18);
 | |
| }
 | 
