Skip to content

Commit 59083d2

Browse files
committed
Address nits by @catamorphism
1 parent af453a3 commit 59083d2

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/libstd/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub unsafe fn set_memory<T>(dst: *mut T, c: u8, count: uint) {
143143
}
144144

145145
/**
146-
* Zeroes out `count` bytes of memory at `dst`
146+
* Zeroes out `count * size_of::<T>` bytes of memory at `dst`
147147
*/
148148
#[inline]
149149
#[cfg(not(stage0))]

src/rt/boxed_region.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ rust_opaque_box *boxed_region::malloc(type_desc *td, size_t body_size) {
3939
rust_opaque_box *boxed_region::realloc(rust_opaque_box *box,
4040
size_t new_size) {
4141

42-
// We also get called on the unique-vec-in-managed-heap path.
43-
// assert(box->ref_count == 1 ||
44-
// box->ref_count == (size_t)(-2));
45-
4642
size_t total_size = new_size + sizeof(rust_opaque_box);
4743
rust_opaque_box *new_box =
4844
(rust_opaque_box*)backing_region->realloc(box, total_size);

src/test/run-pass/borrowck-wg-autoderef-and-autoborrowvec-combined-issue-6272.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929

3030
fn main() {
3131
let a = @mut 3i;
32-
// let b = @mut [a];
33-
// let c = @mut [3];
32+
let b = @mut [a];
33+
let c = @mut [3];
3434

3535
// this should freeze `a` only
3636
let _x: &mut int = a;
3737

3838
// hence these writes should not fail:
39-
// b[0] = b[0];
40-
// c[0] = c[0];
39+
b[0] = b[0];
40+
c[0] = c[0];
4141
}

0 commit comments

Comments
 (0)