From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/run-make/std-core-cycle/bar.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/run-make/std-core-cycle/bar.rs (limited to 'tests/run-make/std-core-cycle/bar.rs') diff --git a/tests/run-make/std-core-cycle/bar.rs b/tests/run-make/std-core-cycle/bar.rs new file mode 100644 index 000000000..9f5e7c29b --- /dev/null +++ b/tests/run-make/std-core-cycle/bar.rs @@ -0,0 +1,16 @@ +#![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 {} + } +} -- cgit v1.2.3