mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			225 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			225 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ run-pass
 | 
						|
#![allow(dead_code)]
 | 
						|
//@ pretty-expanded FIXME #23616
 | 
						|
#![allow(non_camel_case_types)]
 | 
						|
 | 
						|
struct r<F> where F: FnOnce() {
 | 
						|
    field: F,
 | 
						|
}
 | 
						|
 | 
						|
pub fn main() {
 | 
						|
    fn f() {}
 | 
						|
    let _i: r<fn()> = r {field: f as fn()};
 | 
						|
}
 |