rust/tests/ui/allocator/dyn-compatible.rs
2024-10-10 01:13:29 +02:00

14 lines
263 B
Rust

//@ run-pass
// Check that `Allocator` is dyn-compatible, this allows for polymorphic allocators
#![feature(allocator_api)]
use std::alloc::{Allocator, System};
fn ensure_dyn_compatible(_: &dyn Allocator) {}
fn main() {
ensure_dyn_compatible(&System);
}