about summary refs log tree commit diff
path: root/library/core/src/ffi
diff options
context:
space:
mode:
authoraaishwarymishra@gmail.com <aaishwarymishra@gmail.com>2025-01-24 21:50:56 +0530
committeraaishwarymishra@gmail.com <aaishwarymishra@gmail.com>2025-01-24 21:50:56 +0530
commit72e514981fa2776240d0f06d802c99fbaeee00a8 (patch)
tree877a49bf0f575d6043cee528cb204898e3778c3a /library/core/src/ffi
parentebbe63891f1fae21734cb97f2f863b08b1d44bf8 (diff)
ports last few library files to new intrinsic style
Diffstat (limited to 'library/core/src/ffi')
-rw-r--r--library/core/src/ffi/va_list.rs34
1 files changed, 22 insertions, 12 deletions
diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs
index f67c592d8d8..cceb186b31e 100644
--- a/library/core/src/ffi/va_list.rs
+++ b/library/core/src/ffi/va_list.rs
@@ -302,18 +302,28 @@ impl<'f> Drop for VaListImpl<'f> {
     }
 }
 
-extern "rust-intrinsic" {
-    /// Destroy the arglist `ap` after initialization with `va_start` or
-    /// `va_copy`.
-    #[rustc_nounwind]
-    fn va_end(ap: &mut VaListImpl<'_>);
+/// Destroy the arglist `ap` after initialization with `va_start` or
+/// `va_copy`.
+#[rustc_intrinsic]
+#[rustc_intrinsic_must_be_overridden]
+#[rustc_nounwind]
+unsafe fn va_end(_ap: &mut VaListImpl<'_>) {
+    unreachable!()
+}
 
-    /// Copies the current location of arglist `src` to the arglist `dst`.
-    #[rustc_nounwind]
-    fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);
+/// Copies the current location of arglist `src` to the arglist `dst`.
+#[rustc_intrinsic]
+#[rustc_intrinsic_must_be_overridden]
+#[rustc_nounwind]
+unsafe fn va_copy<'f>(_dest: *mut VaListImpl<'f>, _src: &VaListImpl<'f>) {
+    unreachable!()
+}
 
-    /// Loads an argument of type `T` from the `va_list` `ap` and increment the
-    /// argument `ap` points to.
-    #[rustc_nounwind]
-    fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
+/// Loads an argument of type `T` from the `va_list` `ap` and increment the
+/// argument `ap` points to.
+#[rustc_intrinsic]
+#[rustc_intrinsic_must_be_overridden]
+#[rustc_nounwind]
+unsafe fn va_arg<T: sealed_trait::VaArgSafe>(_ap: &mut VaListImpl<'_>) -> T {
+    unreachable!()
 }