mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 01:10:36 +00:00
14 lines
263 B
Rust
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);
|
|
}
|