Skip to content

Commit 3f2c9ee

Browse files
committed
Auto merge of #1905 - camelid:rustup, r=RalfJung
rustup r? `@RalfJung`
2 parents 9c18177 + 6d1d8c6 commit 3f2c9ee

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c7a30c8b6860d1f3459086f7a91074db1b54bc37
1+
db062de72b0a064f45b6f86894cbdc7c0ec68844

tests/compile-fail/alloc/reallocate-bad-size.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ use std::alloc::{alloc, realloc, Layout};
55
fn main() {
66
unsafe {
77
let x = alloc(Layout::from_size_align_unchecked(1, 1));
8-
realloc(x, Layout::from_size_align_unchecked(2, 1), 1);
8+
let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1);
99
}
1010
}

tests/compile-fail/alloc/reallocate-change-alloc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::alloc::{alloc, realloc, Layout};
33
fn main() {
44
unsafe {
55
let x = alloc(Layout::from_size_align_unchecked(1, 1));
6-
realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
6+
let _y = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
77
let _z = *x; //~ ERROR dereferenced after this allocation got freed
88
}
99
}

tests/compile-fail/alloc/reallocate-dangling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ fn main() {
66
unsafe {
77
let x = alloc(Layout::from_size_align_unchecked(1, 1));
88
dealloc(x, Layout::from_size_align_unchecked(1, 1));
9-
realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
9+
let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
1010
}
1111
}

0 commit comments

Comments
 (0)