]> git.proxmox.com Git - rustc.git/blame - src/test/run-make-fulldeps/std-core-cycle/bar.rs
New upstream version 1.27.2+dfsg1
[rustc.git] / src / test / run-make-fulldeps / std-core-cycle / bar.rs
CommitLineData
2c00a5a8 1// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
223e47cc
LB
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
0531ce1d
XL
11#![feature(allocator_api)]
12#![crate_type = "rlib"]
13
83c7162d 14use std::alloc::*;
0531ce1d
XL
15
16pub struct A;
17
83c7162d
XL
18unsafe impl GlobalAlloc for A {
19 unsafe fn alloc(&self, _: Layout) -> *mut Opaque {
0531ce1d
XL
20 loop {}
21 }
22
83c7162d 23 unsafe fn dealloc(&self, _ptr: *mut Opaque, _: Layout) {
0531ce1d
XL
24 loop {}
25 }
54a0048b 26}