mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 04:24:26 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			372 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			372 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ compile-flags: -C no-prepopulate-passes -Zshare-generics=yes -Zinline-mir=no
 | |
| 
 | |
| // Check that local generics are internalized if they are in the same CGU
 | |
| 
 | |
| // CHECK-LABEL: ; local_generics_in_exe_internalized::foo
 | |
| // CHECK-NEXT: ; Function Attrs:
 | |
| // CHECK-NEXT: define internal
 | |
| pub fn foo<T>(x: T, y: T) -> (T, T) {
 | |
|     (x, y)
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let _ = foo(0u8, 1u8);
 | |
| }
 | 
