]> git.lizzy.rs Git - rust.git/commit
Use the right array type in trans_slice_vec
authorBjörn Steinbrink <bsteinbr@gmail.com>
Tue, 17 Feb 2015 09:43:27 +0000 (10:43 +0100)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Tue, 17 Feb 2015 09:43:27 +0000 (10:43 +0100)
commit0fe880bdb788032100b9cd1633770b56393784f6
treee9912c2bf39ac70e0ec750c12f9af8bc66d75850
parentf1bb6c2f46f08c1d7b6d695f5b3cf93142cb8860
Use the right array type in trans_slice_vec

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.
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/tvec.rs