1 #![feature(intrinsics, staged_api, const_intrinsic_copy)]
2 #![stable(feature = "core", since = "1.6.0")]
4 #[stable(feature = "rust1", since = "1.0.0")]
5 #[rustc_const_unstable(feature = "const_intrinsic_copy", issue = "80697")]
7 pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
8 // Const stability attributes are not inherited from parent items.
9 extern "rust-intrinsic" {
10 fn copy<T>(src: *const T, dst: *mut T, count: usize);
13 unsafe { copy(src, dst, count) }
14 //~^ ERROR calls in constant functions are limited to constant functions