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.rs30
1 files changed, 29 insertions, 1 deletions
diff --git a/crates/test-utils/src/minicore.rs b/crates/test-utils/src/minicore.rs
index 8975fa56d7..ff531af638 100644
--- a/crates/test-utils/src/minicore.rs
+++ b/crates/test-utils/src/minicore.rs
@@ -55,10 +55,11 @@
//! manually_drop: drop
//! matches:
//! non_null:
-//! non_zero:
+//! non_zero: transmute, option
//! option: panic
//! ord: eq, option
//! panic: fmt
+//! pat:
//! phantom_data:
//! pin:
//! pointee: copy, send, sync, ord, hash, unpin, phantom_data
@@ -2278,6 +2279,33 @@ mod macros {
// endregion:deref_pat
}
+// region:pat
+pub mod pat {
+ #[macro_export]
+ #[rustc_builtin_macro(pattern_type)]
+ macro_rules! pattern_type {
+ ($($arg:tt)*) => {
+ /* compiler built-in */
+ };
+ }
+
+ pub const trait RangePattern {
+ /// Trait version of the inherent `MIN` assoc const.
+ #[lang = "RangeMin"]
+ const MIN: Self;
+
+ /// Trait version of the inherent `MIN` assoc const.
+ #[lang = "RangeMax"]
+ const MAX: Self;
+
+ /// A compile-time helper to subtract 1 for exclusive ranges.
+ #[lang = "RangeSub"]
+ #[track_caller]
+ fn sub_one(self) -> Self;
+ }
+}
+// endregion:pat
+
// region:non_zero
pub mod num {
#[repr(transparent)]