os-rust/tests/ui/allocator/dyn-compatible.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
263 B
Rust
Raw Normal View History

//@ 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);
}