Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
allocator
/
object-safe.rs
blob: fae7ab7fe331969f16637fa25ab3878db28729e1 [
file
] [
log
] [
blame
]
// run-pass
// Check that `Allocator` is object safe, this allows for polymorphic allocators
#![
feature
(
allocator_api
)]
use
std
::
alloc
::{
Allocator
,
System
};
fn
ensure_object_safe
(
_
:
&
dyn
Allocator
)
{}
fn
main
()
{
ensure_object_safe
(&
System
);
}