mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
433da1fc04
They pass fine.
17 lines
274 B
Rust
17 lines
274 B
Rust
#![feature(allocator_api)]
|
|
#![crate_type = "rlib"]
|
|
|
|
use std::alloc::*;
|
|
|
|
pub struct A;
|
|
|
|
unsafe impl GlobalAlloc for A {
|
|
unsafe fn alloc(&self, _: Layout) -> *mut u8 {
|
|
loop {}
|
|
}
|
|
|
|
unsafe fn dealloc(&self, _ptr: *mut u8, _: Layout) {
|
|
loop {}
|
|
}
|
|
}
|