]> git.proxmox.com Git - rustc.git/blob - tests/ui/allocator/object-safe.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / allocator / object-safe.rs
1 // run-pass
2
3 // Check that `Allocator` is object safe, this allows for polymorphic allocators
4
5 #![feature(allocator_api)]
6
7 use std::alloc::{Allocator, System};
8
9 fn ensure_object_safe(_: &dyn Allocator) {}
10
11 fn main() {
12 ensure_object_safe(&System);
13 }