Skip to content

Commit d493659

Browse files
committed
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!
2 parents d2552fa + cb5cd54 commit d493659

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_trans/trans/cabi_x86_win64.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ pub fn compute_abi_info(ccx: &CrateContext,
4242
let ty = match t.kind() {
4343
Struct => {
4444
match llsize_of_alloc(ccx, t) {
45-
1 => ArgType::direct(rty, Some(Type::i8(ccx)), None, None),
46-
2 => ArgType::direct(rty, Some(Type::i16(ccx)), None, None),
47-
4 => ArgType::direct(rty, Some(Type::i32(ccx)), None, None),
48-
8 => ArgType::direct(rty, Some(Type::i64(ccx)), None, None),
45+
1 => ArgType::direct(t, Some(Type::i8(ccx)), None, None),
46+
2 => ArgType::direct(t, Some(Type::i16(ccx)), None, None),
47+
4 => ArgType::direct(t, Some(Type::i32(ccx)), None, None),
48+
8 => ArgType::direct(t, Some(Type::i64(ccx)), None, None),
4949
_ => ArgType::indirect(t, Some(Attribute::ByVal))
5050
}
5151
}

0 commit comments

Comments
 (0)