mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			248 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			248 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| // compile-flags: -Zpolymorphize=on -Zmir-opt-level=4
 | |
| 
 | |
| fn caller<T, U>() -> &'static usize {
 | |
|     callee::<U>()
 | |
| }
 | |
| 
 | |
| fn callee<T>() -> &'static usize {
 | |
|     &std::mem::size_of::<T>()
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     assert_eq!(caller::<(), ()>(), &0);
 | |
| }
 | 
