about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-08-11 22:11:41 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-08-11 22:42:21 -0700
commitd493659d7bbc04c35ec541b141679bf5aa3aa9db (patch)
tree09363b902819d5827fde04e46eb6287775042545
parentd2552faa9dfe6e3ba146a238b7944a7c82b1eb52 (diff)
parentcb5cd5497c23061fdea957819539503e32bff48a (diff)
downloadrust-d493659d7bbc04c35ec541b141679bf5aa3aa9db.tar.gz
rust-d493659d7bbc04c35ec541b141679bf5aa3aa9db.zip
rollup merge of #27666: vadimcn/cabi-typo
I was not able to come up with tests that would expose this bug, as, apparently, Rust types of the args are not used for anything but debug logging.
Thanks to @luqmana for pointing this out!
-rw-r--r--src/librustc_trans/trans/cabi_x86_win64.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_trans/trans/cabi_x86_win64.rs b/src/librustc_trans/trans/cabi_x86_win64.rs
index 262dcc47059..0a39150dbd3 100644
--- a/src/librustc_trans/trans/cabi_x86_win64.rs
+++ b/src/librustc_trans/trans/cabi_x86_win64.rs
@@ -42,10 +42,10 @@ pub fn compute_abi_info(ccx: &CrateContext,
         let ty = match t.kind() {
             Struct => {
                 match llsize_of_alloc(ccx, t) {
-                    1 => ArgType::direct(rty, Some(Type::i8(ccx)), None, None),
-                    2 => ArgType::direct(rty, Some(Type::i16(ccx)), None, None),
-                    4 => ArgType::direct(rty, Some(Type::i32(ccx)), None, None),
-                    8 => ArgType::direct(rty, Some(Type::i64(ccx)), None, None),
+                    1 => ArgType::direct(t, Some(Type::i8(ccx)), None, None),
+                    2 => ArgType::direct(t, Some(Type::i16(ccx)), None, None),
+                    4 => ArgType::direct(t, Some(Type::i32(ccx)), None, None),
+                    8 => ArgType::direct(t, Some(Type::i64(ccx)), None, None),
                     _ => ArgType::indirect(t, Some(Attribute::ByVal))
                 }
             }