graydon/rust — Issue #1059: fns using c-stack-cdecl native ABI cannot be called from outside crate
Author: nikomatsakis
Created: 2011-10-21 22:40:43+00:00
State: open

Calling a native function declared with "c-stack-cdecl" ABI from outside the create fails in LLVM. The type of the function includes the implicit parameters when it should not. The path through the code is: The code path is that when we look up the external identifier we go through `trans_external_path()` -> `type_of_ty_param_kinds_and_ty()` -> `type_of_fn_from_ty()` -> `type_of_fn()`, and `type_of_fn()` adds the implicit parameters.