]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #22437: dotdash/fix_array_type
authorAlex Crichton <alex@alexcrichton.com>
Wed, 18 Feb 2015 22:31:59 +0000 (14:31 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 18 Feb 2015 22:31:59 +0000 (14:31 -0800)
In trans_slice_vec we currently use arrayalloca, which gives us a
pointer to the element type with enough memory allocated for the
requested number of elements.  This works, but everywhere else we use
the [n x T] type for fixed size arrays and so we have to bitcast the
pointer here. Let's directly use the proper type for the allocation and
remove some code duplication along the way.

1  2 
src/librustc_trans/trans/base.rs

Simple merge