Skip to content

Commit b8f2e2d

Browse files
committed
---
yaml --- r: 225237 b: refs/heads/stable c: 8527c7f h: refs/heads/master i: 225235: 61c9e4e v: v3
1 parent f7ee3a7 commit b8f2e2d

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 860448f070d56885317bbe1d9ae81871008a9143
32+
refs/heads/stable: 8527c7f43bd1eea4009fc6960547519e08eaba3e
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/src/librustc_trans/trans/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
223223
let val = if datum.kind.is_by_ref() {
224224
load_ty(bcx, datum.val, datum.ty)
225225
} else {
226-
datum.val
226+
from_arg_ty(bcx, datum.val, datum.ty)
227227
};
228228

229229
let cast_val = BitCast(bcx, val, llret_ty);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::mem::transmute;
12+
13+
fn main() {
14+
unsafe {
15+
let _: i8 = transmute(false);
16+
let _: i8 = transmute(true);
17+
let _: bool = transmute(0u8);
18+
let _: bool = transmute(1u8);
19+
}
20+
}

0 commit comments

Comments
 (0)