Address nits by @catamorphism
This commit is contained in:
parent
af453a33cc
commit
59083d2c6a
@ -143,7 +143,7 @@ pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Zeroes out `count` bytes of memory at `dst`
|
||||
* Zeroes out `count * size_of::<T>` bytes of memory at `dst`
|
||||
*/
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
|
@ -39,10 +39,6 @@ rust_opaque_box *boxed_region::malloc(type_desc *td, size_t body_size) {
|
||||
rust_opaque_box *boxed_region::realloc(rust_opaque_box *box,
|
||||
size_t new_size) {
|
||||
|
||||
// We also get called on the unique-vec-in-managed-heap path.
|
||||
// assert(box->ref_count == 1 ||
|
||||
// box->ref_count == (size_t)(-2));
|
||||
|
||||
size_t total_size = new_size + sizeof(rust_opaque_box);
|
||||
rust_opaque_box *new_box =
|
||||
(rust_opaque_box*)backing_region->realloc(box, total_size);
|
||||
|
@ -29,13 +29,13 @@
|
||||
|
||||
fn main() {
|
||||
let a = @mut 3i;
|
||||
// let b = @mut [a];
|
||||
// let c = @mut [3];
|
||||
let b = @mut [a];
|
||||
let c = @mut [3];
|
||||
|
||||
// this should freeze `a` only
|
||||
let _x: &mut int = a;
|
||||
|
||||
// hence these writes should not fail:
|
||||
// b[0] = b[0];
|
||||
// c[0] = c[0];
|
||||
b[0] = b[0];
|
||||
c[0] = c[0];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user