Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/consteval/tests.rs')
| -rw-r--r-- | crates/hir-ty/src/consteval/tests.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir-ty/src/consteval/tests.rs b/crates/hir-ty/src/consteval/tests.rs index 95ebdbd409..4eb8c11fac 100644 --- a/crates/hir-ty/src/consteval/tests.rs +++ b/crates/hir-ty/src/consteval/tests.rs @@ -2217,14 +2217,17 @@ fn boxes() { use core::ops::{Deref, DerefMut}; use core::{marker::Unsize, ops::CoerceUnsized}; +#[rustc_intrinsic] +#[rustc_intrinsic_must_be_overridden] +pub fn box_new<T>(_x: T) -> Box<T>; + #[lang = "owned_box"] pub struct Box<T: ?Sized> { inner: *mut T, } impl<T> Box<T> { fn new(t: T) -> Self { - #[rustc_box] - Box::new(t) + box_new(t) } } |