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 
ensure_object_safe(_: &dyn Allocator)9 fn ensure_object_safe(_: &dyn Allocator) {}
10 
main()11 fn main() {
12     ensure_object_safe(&System);
13 }
14