Skip to content

Commit 7af29da

Browse files
committed
---
yaml --- r: 107422 b: refs/heads/dist-snap c: e71571a h: refs/heads/master v: v3
1 parent e309630 commit 7af29da

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
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 419ac4a1b899ba88fb360b4c71c08f3610564cd4
9+
refs/heads/dist-snap: e71571a3cda0f7a283bd58a1c74a79c06de27661
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)