mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			613 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			613 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
error[E0617]: can't pass a function item to a variadic function
 | 
						|
  --> $DIR/issue-32201.rs:9:16
 | 
						|
   |
 | 
						|
LL |         foo(0, bar);
 | 
						|
   |                ^^^
 | 
						|
   |
 | 
						|
   = help: a function item is zero-sized and needs to be cast into a function pointer to be used in FFI
 | 
						|
   = note: for more information on function items, visit https://doc.rust-lang.org/reference/types/function-item.html
 | 
						|
help: use a function pointer instead
 | 
						|
   |
 | 
						|
LL |         foo(0, bar as fn(*const u8));
 | 
						|
   |                    ++++++++++++++++
 | 
						|
 | 
						|
error: aborting due to 1 previous error
 | 
						|
 | 
						|
For more information about this error, try `rustc --explain E0617`.
 |