Skip to content

Commit 8887f88

Browse files
committed
---
yaml --- r: 98166 b: refs/heads/master c: e71571a h: refs/heads/master v: v3
1 parent 31f2569 commit 8887f88

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 419ac4a1b899ba88fb360b4c71c08f3610564cd4
2+
refs/heads/master: e71571a3cda0f7a283bd58a1c74a79c06de27661
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b6400f998497c3958f40997a71756ead344a776d
55
refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36

trunk/src/librustc/middle/trans/foreign.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,20 +282,20 @@ pub fn trans_native_call<'a>(
282282
// FIXME(#8357) We really ought to report a span here
283283
ccx.sess.fatal(
284284
format!("ABI string `{}` has no suitable ABI \
285-
for target architecture",
286-
fn_abis.user_string(ccx.tcx)));
285+
for target architecture",
286+
fn_abis.user_string(ccx.tcx)));
287287
}
288288
};
289289

290290
// A function pointer is called without the declaration available, so we have to apply
291291
// any attributes with ABI implications directly to the call instruction. Right now, the
292292
// only attribute we need to worry about is `sret`.
293-
let sret_attr = [(1, StructRetAttribute)];
294-
let attrs = if fn_type.ret_ty.is_indirect() {
295-
sret_attr.as_slice()
293+
let sret_attr = if fn_type.ret_ty.is_indirect() {
294+
Some((1, StructRetAttribute))
296295
} else {
297-
&[]
296+
None
298297
};
298+
let attrs = sret_attr.as_slice();
299299
let llforeign_retval = CallWithConv(bcx, llfn, llargs_foreign, cc, attrs);
300300

301301
// If the function we just called does not use an outpointer,

0 commit comments

Comments
 (0)