Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/test-utils/src/minicore.rs')
-rw-r--r--crates/test-utils/src/minicore.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/test-utils/src/minicore.rs b/crates/test-utils/src/minicore.rs
index 4bdd791eb1..d13a81d287 100644
--- a/crates/test-utils/src/minicore.rs
+++ b/crates/test-utils/src/minicore.rs
@@ -31,6 +31,7 @@
//! eq: sized
//! error: fmt
//! fmt: option, result, transmute, coerce_unsized, copy, clone, derive
+//! fmt_before_1_89_0: fmt
//! fn: tuple
//! from: sized, result
//! future: pin
@@ -1175,6 +1176,7 @@ pub mod fmt {
}
}
+ // region:fmt_before_1_89_0
#[lang = "format_unsafe_arg"]
pub struct UnsafeArg {
_private: (),
@@ -1185,6 +1187,7 @@ pub mod fmt {
UnsafeArg { _private: () }
}
}
+ // endregion:fmt_before_1_89_0
}
#[derive(Copy, Clone)]
@@ -1204,6 +1207,7 @@ pub mod fmt {
Arguments { pieces, fmt: None, args: &[] }
}
+ // region:fmt_before_1_89_0
pub fn new_v1_formatted(
pieces: &'a [&'static str],
args: &'a [rt::Argument<'a>],
@@ -1212,6 +1216,17 @@ pub mod fmt {
) -> Arguments<'a> {
Arguments { pieces, fmt: Some(fmt), args }
}
+ // endregion:fmt_before_1_89_0
+
+ // region:!fmt_before_1_89_0
+ pub unsafe fn new_v1_formatted(
+ pieces: &'a [&'static str],
+ args: &'a [rt::Argument<'a>],
+ fmt: &'a [rt::Placeholder],
+ ) -> Arguments<'a> {
+ Arguments { pieces, fmt: Some(fmt), args }
+ }
+ // endregion:!fmt_before_1_89_0
pub const fn as_str(&self) -> Option<&'static str> {
match (self.pieces, self.args) {