]> git.lizzy.rs Git - rust.git/blob - src/test/ui/allocator/object-safe.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / 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 }