diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2011-10-21 12:14:01 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-10-24 16:06:17 -0700 |
| commit | fb48817ade1ad4b9b41315038518d8d84ff8e57c (patch) | |
| tree | c414fffb15e24072554c2aed5fac28d01ad1e0bb /src/test/stdtest | |
| parent | 02d7a1e7818f5ff3f272fe6cba21f82ea543dc39 (diff) | |
| download | rust-fb48817ade1ad4b9b41315038518d8d84ff8e57c.tar.gz rust-fb48817ade1ad4b9b41315038518d8d84ff8e57c.zip | |
work around bug when calling c-stack-cdecl fns from outside crate
In the main test, I call the wrapper instead of the native fn, as intended. I also added an xfail-test that exercises the broken code path. Will file a bug. Description of the broken code path: 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 a lot of external parameters. Problem is, I guess, that we don't pass the native ABI (or even the fact that it's a native function!), just the types and kinds of the parameters.
Diffstat (limited to 'src/test/stdtest')
| -rw-r--r-- | src/test/stdtest/sys.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/stdtest/sys.rs b/src/test/stdtest/sys.rs index 547adba7bf5..6f766e9ee6b 100644 --- a/src/test/stdtest/sys.rs +++ b/src/test/stdtest/sys.rs @@ -1,4 +1,6 @@ import std::sys; #[test] -fn last_os_error() unsafe { log sys::rustrt::last_os_error(); } +fn last_os_error() { + log sys::last_os_error(); +} |
