Skip to content

Commit 33a7363

Browse files
committed
realloc-16687
1 parent fcfead1 commit 33a7363

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/ui/allocator/allocator-reallocate-overflow.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
//! Test for buffer overflow in allocator reallocate.
2+
//!
3+
//! Regression test for: <https://github.com/rust-lang/rust/issues/16687>
4+
15
//@ run-pass
2-
// alloc::heap::reallocate test.
3-
//
4-
// Ideally this would be revised to use no_std, but for now it serves
5-
// well enough to reproduce (and illustrate) the bug from #16687.
66

77
#![feature(allocator_api)]
88
#![feature(slice_ptr_get)]
99

10-
use std::alloc::{handle_alloc_error, Allocator, Global, Layout};
10+
use std::alloc::{Allocator, Global, Layout, handle_alloc_error};
1111
use std::ptr::{self, NonNull};
1212

1313
fn main() {

0 commit comments

Comments
 (0)