rust/tests/ui/allocator/object-safe.rs
2023-01-11 09:32:08 +00:00

14 lines
253 B
Rust

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