about summary refs log tree commit diff
path: root/tests/ui/allocator/dyn-compatible.rs
blob: 9d8235e58d9297db053275ad929d015ccd2e62a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ 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);
}