mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-30 16:11:41 +00:00
28 lines
99 KiB
HTML
28 lines
99 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `MiniCore` struct in crate `test_utils`."><title>MiniCore in test_utils - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="test_utils" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0 (ded5c06cf 2025-12-08)" data-channel="1.92.0" data-search-js="search-d69d8955.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MiniCore</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../test_utils/index.html">test_<wbr>utils</a><span class="version">0.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mini<wbr>Core</a></h2><h3><a href="#implementations">Associated Constants</a></h3><ul class="block associatedconstant"><li><a href="#associatedconstant.RAW_SOURCE" title="RAW_SOURCE">RAW_SOURCE</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.available_flags" title="available_flags">available_flags</a></li><li><a href="#method.from_flags" title="from_flags">from_flags</a></li><li><a href="#method.source_code" title="source_code">source_code</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-MiniCore" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-MiniCore" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-MiniCore" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-MiniCore" title="Send">Send</a></li><li><a href="#impl-Sync-for-MiniCore" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-MiniCore" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-MiniCore" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Instrument-for-T" title="Instrument">Instrument</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-IntoBox%3Cdyn+Any+%2B+Send+%2B+Sync%3E-for-T" title="IntoBox<dyn Any + Send + Sync>">IntoBox<dyn Any + Send + Sync></a></li><li><a href="#impl-IntoBox%3Cdyn+Any+%2B+Send%3E-for-T" title="IntoBox<dyn Any + Send>">IntoBox<dyn Any + Send></a></li><li><a href="#impl-IntoBox%3Cdyn+Any%3E-for-T" title="IntoBox<dyn Any>">IntoBox<dyn Any></a></li><li><a href="#impl-IntoEither-for-T" title="IntoEither">IntoEither</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li><li><a href="#impl-WithSubscriber-for-T" title="WithSubscriber">WithSubscriber</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate test_<wbr>utils</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">test_utils</a></div><h1>Struct <span class="struct">Mini<wbr>Core</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/test_utils/fixture.rs.html#146-149">Source</a> </span></div><pre class="rust item-decl"><code>pub struct MiniCore { <span class="comment">/* private fields */</span> }</code></pre><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-MiniCore" class="impl"><a class="src rightside" href="../src/test_utils/fixture.rs.html#355-528">Source</a><a href="#impl-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section></summary><div class="impl-items"><section id="associatedconstant.RAW_SOURCE" class="associatedconstant"><a class="src rightside" href="../src/test_utils/fixture.rs.html#356">Source</a><h4 class="code-header">pub const <a href="#associatedconstant.RAW_SOURCE" class="constant">RAW_SOURCE</a>: &'static <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.str.html">str</a> = "//! This is a fixture we use for tests that need lang items.\n//!\n//! We want to include the minimal subset of core for each test, so this file\n//! supports \"conditional compilation\". Tests use the following syntax to include minicore:\n//!\n//! //- minicore: flag1, flag2\n//!\n//! We then strip all the code marked with other flags.\n//!\n//! Available flags:\n//! add:\n//! asm:\n//! assert:\n//! as_mut: sized\n//! as_ref: sized\n//! async_fn: fn, tuple, future, copy\n//! bool_impl: option, fn\n//! builtin_impls:\n//! borrow: sized\n//! borrow_mut: borrow\n//! cell: copy, drop\n//! clone: sized\n//! coerce_pointee: derive, sized, unsize, coerce_unsized, dispatch_from_dyn\n//! coerce_unsized: unsize\n//! concat:\n//! copy: clone\n//! default: sized\n//! deref_mut: deref\n//! deref: sized\n//! derive:\n//! discriminant:\n//! drop: sized\n//! env: option\n//! eq: sized\n//! error: fmt\n//! fmt: option, result, transmute, coerce_unsized, copy, clone, derive\n//! fmt_before_1_93_0: fmt\n//! fmt_before_1_89_0: fmt_before_1_93_0\n//! fn: sized, tuple\n//! from: sized, result\n//! future: pin\n//! coroutine: pin\n//! dispatch_from_dyn: unsize, pin\n//! hash: sized\n//! include:\n//! index: sized\n//! infallible:\n//! int_impl: size_of, transmute\n//! iterator: option\n//! iterators: iterator, fn\n//! manually_drop: drop\n//! non_null:\n//! non_zero:\n//! option: panic\n//! ord: eq, option\n//! panic: fmt\n//! phantom_data:\n//! pin:\n//! pointee: copy, send, sync, ord, hash, unpin, phantom_data\n//! range:\n//! receiver: deref\n//! result:\n//! send: sized\n//! size_of: sized\n//! sized:\n//! slice:\n//! str:\n//! sync: sized\n//! transmute:\n//! try: infallible\n//! tuple:\n//! unary_ops:\n//! unpin: sized\n//! unsize: sized\n//! write: fmt\n//! todo: panic\n//! unimplemented: panic\n//! column:\n//! addr_of:\n//! offset_of:\n\n#![rustc_coherence_is_core]\n\npub mod marker {\n // region:sized\n #[lang = \"pointee_sized\"]\n #[fundamental]\n #[rustc_specialization_trait]\n #[rustc_coinductive]\n pub trait PointeeSized {}\n\n #[lang = \"meta_sized\"]\n #[fundamental]\n #[rustc_specialization_trait]\n #[rustc_coinductive]\n pub trait MetaSized: PointeeSized {}\n\n #[lang = \"sized\"]\n #[fundamental]\n #[rustc_specialization_trait]\n #[rustc_coinductive]\n pub trait Sized: MetaSized {}\n // endregion:sized\n\n // region:send\n pub unsafe auto trait Send {}\n\n impl<T: PointeeSized> !Send for *const T {}\n impl<T: PointeeSized> !Send for *mut T {}\n // region:sync\n unsafe impl<T: Sync + PointeeSized> Send for &T {}\n unsafe impl<T: Send + PointeeSized> Send for &mut T {}\n // endregion:sync\n // endregion:send\n\n // region:sync\n pub unsafe auto trait Sync {}\n\n impl<T: PointeeSized> !Sync for *const T {}\n impl<T: PointeeSized> !Sync for *mut T {}\n // endregion:sync\n\n // region:unsize\n #[lang = \"unsize\"]\n pub trait Unsize<T: PointeeSized>: PointeeSized {}\n // endregion:unsize\n\n // region:unpin\n #[lang = \"unpin\"]\n pub auto trait Unpin {}\n // endregion:unpin\n\n // region:copy\n #[lang = \"copy\"]\n pub trait Copy: Clone {}\n // region:derive\n #[rustc_builtin_macro]\n pub macro Copy($item:item) {}\n // endregion:derive\n\n mod copy_impls {\n use super::{Copy, PointeeSized};\n\n macro_rules! impl_copy {\n ($($t:ty)*) => {\n $(\n impl Copy for $t {}\n )*\n }\n }\n\n impl_copy! {\n usize u8 u16 u32 u64 u128\n isize i8 i16 i32 i64 i128\n f16 f32 f64 f128\n bool char\n }\n\n impl<T: PointeeSized> Copy for *const T {}\n impl<T: PointeeSized> Copy for *mut T {}\n impl<T: PointeeSized> Copy for &T {}\n impl Copy for ! {}\n }\n // endregion:copy\n\n // region:tuple\n #[lang = \"tuple_trait\"]\n pub trait Tuple {}\n // endregion:tuple\n\n // region:phantom_data\n #[lang = \"phantom_data\"]\n pub struct PhantomData<T: PointeeSized>;\n\n // region:clone\n impl<T: PointeeSized> Clone for PhantomData<T> {\n fn clone(&self) -> Self { Self }\n }\n // endregion:clone\n\n // region:copy\n impl<T: PointeeSized> Copy for PhantomData<T> {}\n // endregion:copy\n\n // endregion:phantom_data\n\n // region:discriminant\n #[lang = \"discriminant_kind\"]\n pub trait DiscriminantKind {\n #[lang = \"discriminant_type\"]\n type Discriminant;\n }\n // endregion:discriminant\n\n // region:coerce_pointee\n #[rustc_builtin_macro(CoercePointee, attributes(pointee))]\n #[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]\n pub macro CoercePointee($item:item) {\n /* compiler built-in */\n }\n // endregion:coerce_pointee\n}\n\n// region:default\npub mod default {\n pub trait Default: Sized {\n fn default() -> Self;\n }\n // region:derive\n #[rustc_builtin_macro(Default, attributes(default))]\n pub macro Default($item:item) {}\n // endregion:derive\n\n // region:builtin_impls\n macro_rules! impl_default {\n ($v:literal; $($t:ty)*) => {\n $(\n impl Default for $t {\n fn default() -> Self {\n $v\n }\n }\n )*\n }\n }\n\n impl_default! {\n 0; usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128\n }\n impl_default! {\n 0.0; f16 f32 f64 f128\n }\n // endregion:builtin_impls\n}\n// endregion:default\n\n// region:hash\npub mod hash {\n use crate::marker::PointeeSized;\n\n pub trait Hasher {}\n\n pub trait Hash: PointeeSized {\n fn hash<H: Hasher>(&self, state: &mut H);\n }\n\n // region:derive\n pub(crate) mod derive {\n #[rustc_builtin_macro]\n pub macro Hash($item:item) {}\n }\n pub use derive::Hash;\n // endregion:derive\n}\n// endregion:hash\n\n// region:cell\npub mod cell {\n use crate::marker::PointeeSized;\n use crate::mem;\n\n #[lang = \"unsafe_cell\"]\n pub struct UnsafeCell<T: PointeeSized> {\n value: T,\n }\n\n impl<T> UnsafeCell<T> {\n pub const fn new(value: T) -> UnsafeCell<T> {\n UnsafeCell { value }\n }\n\n pub const fn get(&self) -> *mut T {\n self as *const UnsafeCell<T> as *const T as *mut T\n }\n }\n\n pub struct Cell<T: PointeeSized> {\n value: UnsafeCell<T>,\n }\n\n impl<T> Cell<T> {\n pub const fn new(value: T) -> Cell<T> {\n Cell { value: UnsafeCell::new(value) }\n }\n\n pub fn set(&self, val: T) {\n let old = self.replace(val);\n mem::drop(old);\n }\n\n pub fn replace(&self, val: T) -> T {\n mem::replace(unsafe { &mut *self.value.get() }, val)\n }\n }\n\n impl<T: Copy> Cell<T> {\n pub fn get(&self) -> T {\n unsafe { *self.value.get() }\n }\n }\n}\n// endregion:cell\n\n// region:clone\npub mod clone {\n #[lang = \"clone\"]\n pub trait Clone: Sized {\n fn clone(&self) -> Self;\n }\n\n impl<T> Clone for &T {\n fn clone(&self) -> Self {\n *self\n }\n }\n\n // region:builtin_impls\n macro_rules! impl_clone {\n ($($t:ty)*) => {\n $(\n impl const Clone for $t {\n fn clone(&self) -> Self {\n *self\n }\n }\n )*\n }\n }\n\n impl_clone! {\n usize u8 u16 u32 u64 u128\n isize i8 i16 i32 i64 i128\n f16 f32 f64 f128\n bool char\n }\n\n impl Clone for ! {\n fn clone(&self) {\n *self\n }\n }\n\n impl<T: Clone> Clone for [T; 0] {\n fn clone(&self) -> Self {\n []\n }\n }\n\n impl<T: Clone> Clone for [T; 1] {\n fn clone(&self) -> Self {\n [self[0].clone()]\n }\n }\n // endregion:builtin_impls\n\n // region:derive\n #[rustc_builtin_macro]\n pub macro Clone($item:item) {}\n // endregion:derive\n}\n// endregion:clone\n\npub mod convert {\n // region:from\n pub trait From<T>: Sized {\n fn from(_: T) -> Self;\n }\n pub trait Into<T>: Sized {\n fn into(self) -> T;\n }\n\n impl<T, U> Into<U> for T\n where\n U: From<T>,\n {\n fn into(self) -> U {\n U::from(self)\n }\n }\n\n impl<T> From<T> for T {\n fn from(t: T) -> T {\n t\n }\n }\n\n pub trait TryFrom<T>: Sized {\n type Error;\n fn try_from(value: T) -> Result<Self, Self::Error>;\n }\n pub trait TryInto<T>: Sized {\n type Error;\n fn try_into(self) -> Result<T, Self::Error>;\n }\n\n impl<T, U> TryInto<U> for T\n where\n U: TryFrom<T>,\n {\n type Error = U::Error;\n fn try_into(self) -> Result<U, U::Error> {\n U::try_from(self)\n }\n }\n // endregion:from\n\n // region:as_ref\n pub trait AsRef<T: crate::marker::PointeeSized>: crate::marker::PointeeSized {\n fn as_ref(&self) -> &T;\n }\n // endregion:as_ref\n // region:as_mut\n pub trait AsMut<T: crate::marker::PointeeSized>: crate::marker::PointeeSized {\n fn as_mut(&mut self) -> &mut T;\n }\n // endregion:as_mut\n // region:infallible\n pub enum Infallible {}\n // endregion:infallible\n}\n\npub mod borrow {\n // region:borrow\n pub trait Borrow<Borrowed: ?Sized> {\n fn borrow(&self) -> &Borrowed;\n }\n // endregion:borrow\n\n // region:borrow_mut\n pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> {\n fn borrow_mut(&mut self) -> &mut Borrowed;\n }\n // endregion:borrow_mut\n}\n\npub mod mem {\n // region:manually_drop\n use crate::marker::PointeeSized;\n\n #[lang = \"manually_drop\"]\n #[repr(transparent)]\n pub struct ManuallyDrop<T: PointeeSized> {\n value: T,\n }\n\n impl<T> ManuallyDrop<T> {\n pub const fn new(value: T) -> ManuallyDrop<T> {\n ManuallyDrop { value }\n }\n }\n\n // region:deref\n impl<T: PointeeSized> crate::ops::Deref for ManuallyDrop<T> {\n type Target = T;\n fn deref(&self) -> &T {\n &self.value\n }\n }\n // endregion:deref\n\n // endregion:manually_drop\n\n // region:drop\n pub fn drop<T>(_x: T) {}\n pub const fn replace<T>(dest: &mut T, src: T) -> T {\n unsafe {\n let result = crate::ptr::read(dest);\n crate::ptr::write(dest, src);\n result\n }\n }\n // endregion:drop\n\n // region:transmute\n #[rustc_intrinsic]\n pub fn transmute<Src, Dst>(src: Src) -> Dst;\n // endregion:transmute\n\n // region:size_of\n #[rustc_intrinsic]\n pub fn size_of<T>() -> usize;\n // endregion:size_of\n\n // region:discriminant\n use crate::marker::DiscriminantKind;\n pub struct Discriminant<T>(<T as DiscriminantKind>::Discriminant);\n // endregion:discriminant\n\n // region:offset_of\n pub macro offset_of($Container:ty, $($fields:expr)+ $(,)?) {\n // The `{}` is for better error messages\n {builtin # offset_of($Container, $($fields)+)}\n }\n // endregion:offset_of\n}\n\npub mod ptr {\n // region:drop\n #[lang = \"drop_in_place\"]\n pub unsafe fn drop_in_place<T: crate::marker::PointeeSized>(to_drop: *mut T) {\n unsafe { drop_in_place(to_drop) }\n }\n pub const unsafe fn read<T>(src: *const T) -> T {\n unsafe { *src }\n }\n pub const unsafe fn write<T>(dst: *mut T, src: T) {\n unsafe {\n *dst = src;\n }\n }\n // endregion:drop\n\n // region:pointee\n #[lang = \"pointee_trait\"]\n #[rustc_deny_explicit_impl(implement_via_object = false)]\n pub trait Pointee: crate::marker::PointeeSized {\n #[lang = \"metadata_type\"]\n type Metadata: Copy + Send + Sync + Ord + Hash + Unpin;\n }\n\n #[lang = \"dyn_metadata\"]\n pub struct DynMetadata<Dyn: PointeeSized> {\n _phantom: crate::marker::PhantomData<Dyn>,\n }\n\n pub const fn metadata<T: PointeeSized>(ptr: *const T) -> <T as Pointee>::Metadata {\n loop {}\n }\n\n // endregion:pointee\n // region:non_null\n #[rustc_layout_scalar_valid_range_start(1)]\n #[rustc_nonnull_optimization_guaranteed]\n pub struct NonNull<T: crate::marker::PointeeSized> {\n pointer: *const T,\n }\n // region:coerce_unsized\n impl<T: crate::marker::PointeeSized, U: crate::marker::PointeeSized>\n crate::ops::CoerceUnsized<NonNull<U>> for NonNull<T>\n where\n T: crate::marker::Unsize<U>,\n {\n }\n // endregion:coerce_unsized\n // endregion:non_null\n\n // region:addr_of\n #[rustc_macro_transparency = \"semitransparent\"]\n pub macro addr_of($place:expr) {\n &raw const $place\n }\n #[rustc_macro_transparency = \"semitransparent\"]\n pub macro addr_of_mut($place:expr) {\n &raw mut $place\n }\n // endregion:addr_of\n}\n\npub mod ops {\n // region:coerce_unsized\n mod unsize {\n use crate::marker::{PointeeSized, Unsize};\n\n #[lang = \"coerce_unsized\"]\n pub trait CoerceUnsized<T> {}\n\n impl<\'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<&\'a mut U> for &\'a mut T {}\n impl<\'a, \'b: \'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<&\'a U> for &\'b mut T {}\n impl<\'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*mut U> for &\'a mut T {}\n impl<\'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*const U> for &\'a mut T {}\n\n impl<\'a, \'b: \'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<&\'a U> for &\'b T {}\n impl<\'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*const U> for &\'a T {}\n\n impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*mut U> for *mut T {}\n impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*const U> for *mut T {}\n impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*const U> for *const T {}\n }\n pub use self::unsize::CoerceUnsized;\n // endregion:coerce_unsized\n\n // region:deref\n mod deref {\n use crate::marker::PointeeSized;\n\n #[lang = \"deref\"]\n pub trait Deref: PointeeSized {\n #[lang = \"deref_target\"]\n type Target: ?Sized;\n fn deref(&self) -> &Self::Target;\n }\n\n impl<T: PointeeSized> Deref for &T {\n type Target = T;\n fn deref(&self) -> &T {\n *self\n }\n }\n impl<T: PointeeSized> Deref for &mut T {\n type Target = T;\n fn deref(&self) -> &T {\n *self\n }\n }\n // region:deref_mut\n #[lang = \"deref_mut\"]\n pub trait DerefMut: Deref + PointeeSized {\n fn deref_mut(&mut self) -> &mut Self::Target;\n }\n // endregion:deref_mut\n\n // region:receiver\n #[lang = \"receiver\"]\n pub trait Receiver: PointeeSized {\n #[lang = \"receiver_target\"]\n type Target: ?Sized;\n }\n\n impl<P: PointeeSized, T: PointeeSized> Receiver for P\n where\n P: Deref<Target = T>,\n {\n type Target = T;\n }\n // endregion:receiver\n }\n pub use self::deref::{\n Deref,\n DerefMut, // :deref_mut\n Receiver, // :receiver\n };\n // endregion:deref\n\n // region:drop\n #[lang = \"drop\"]\n pub trait Drop {\n fn drop(&mut self);\n }\n // endregion:drop\n\n // region:index\n mod index {\n #[lang = \"index\"]\n pub trait Index<Idx: ?Sized> {\n type Output: ?Sized;\n fn index(&self, index: Idx) -> &Self::Output;\n }\n #[lang = \"index_mut\"]\n pub trait IndexMut<Idx: ?Sized>: Index<Idx> {\n fn index_mut(&mut self, index: Idx) -> &mut Self::Output;\n }\n\n // region:slice\n impl<T, I> Index<I> for [T]\n where\n I: SliceIndex<[T]>,\n {\n type Output = I::Output;\n fn index(&self, _index: I) -> &I::Output {\n loop {}\n }\n }\n impl<T, I> IndexMut<I> for [T]\n where\n I: SliceIndex<[T]>,\n {\n fn index_mut(&mut self, _index: I) -> &mut I::Output {\n loop {}\n }\n }\n\n impl<T, I, const N: usize> Index<I> for [T; N]\n where\n I: SliceIndex<[T]>,\n {\n type Output = I::Output;\n fn index(&self, _index: I) -> &I::Output {\n loop {}\n }\n }\n impl<T, I, const N: usize> IndexMut<I> for [T; N]\n where\n I: SliceIndex<[T]>,\n {\n fn index_mut(&mut self, _index: I) -> &mut I::Output {\n loop {}\n }\n }\n\n pub unsafe trait SliceIndex<T: ?Sized> {\n type Output: ?Sized;\n }\n unsafe impl<T> SliceIndex<[T]> for usize {\n type Output = T;\n }\n // endregion:slice\n }\n pub use self::index::{Index, IndexMut};\n // endregion:index\n\n // region:range\n mod range {\n #[lang = \"RangeFull\"]\n pub struct RangeFull;\n\n #[lang = \"Range\"]\n pub struct Range<Idx> {\n pub start: Idx,\n pub end: Idx,\n }\n\n #[lang = \"RangeFrom\"]\n pub struct RangeFrom<Idx> {\n pub start: Idx,\n }\n\n #[lang = \"RangeTo\"]\n pub struct RangeTo<Idx> {\n pub end: Idx,\n }\n\n #[lang = \"RangeInclusive\"]\n pub struct RangeInclusive<Idx> {\n pub(crate) start: Idx,\n pub(crate) end: Idx,\n pub(crate) exhausted: bool,\n }\n\n #[lang = \"RangeToInclusive\"]\n pub struct RangeToInclusive<Idx> {\n pub end: Idx,\n }\n }\n pub use self::range::{Range, RangeFrom, RangeFull, RangeTo};\n pub use self::range::{RangeInclusive, RangeToInclusive};\n // endregion:range\n\n // region:fn\n mod function {\n use crate::marker::Tuple;\n\n #[lang = \"fn\"]\n #[fundamental]\n #[rustc_paren_sugar]\n pub trait Fn<Args: Tuple>: FnMut<Args> {\n extern \"rust-call\" fn call(&self, args: Args) -> Self::Output;\n }\n\n #[lang = \"fn_mut\"]\n #[fundamental]\n #[rustc_paren_sugar]\n pub trait FnMut<Args: Tuple>: FnOnce<Args> {\n extern \"rust-call\" fn call_mut(&mut self, args: Args) -> Self::Output;\n }\n\n #[lang = \"fn_once\"]\n #[fundamental]\n #[rustc_paren_sugar]\n pub trait FnOnce<Args: Tuple> {\n #[lang = \"fn_once_output\"]\n type Output;\n extern \"rust-call\" fn call_once(self, args: Args) -> Self::Output;\n }\n\n mod impls {\n use crate::marker::Tuple;\n\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n #[rustc_const_unstable(feature = \"const_fn_trait_ref_impls\", issue = \"101803\")]\n impl<A: Tuple, F: ?Sized> const Fn<A> for &F\n where\n F: [const] Fn<A>,\n {\n extern \"rust-call\" fn call(&self, args: A) -> F::Output {\n (**self).call(args)\n }\n }\n\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n #[rustc_const_unstable(feature = \"const_fn_trait_ref_impls\", issue = \"101803\")]\n impl<A: Tuple, F: ?Sized> const FnMut<A> for &F\n where\n F: [const] Fn<A>,\n {\n extern \"rust-call\" fn call_mut(&mut self, args: A) -> F::Output {\n (**self).call(args)\n }\n }\n\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n #[rustc_const_unstable(feature = \"const_fn_trait_ref_impls\", issue = \"101803\")]\n impl<A: Tuple, F: ?Sized> const FnOnce<A> for &F\n where\n F: [const] Fn<A>,\n {\n type Output = F::Output;\n\n extern \"rust-call\" fn call_once(self, args: A) -> F::Output {\n (*self).call(args)\n }\n }\n\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n #[rustc_const_unstable(feature = \"const_fn_trait_ref_impls\", issue = \"101803\")]\n impl<A: Tuple, F: ?Sized> const FnMut<A> for &mut F\n where\n F: [const] FnMut<A>,\n {\n extern \"rust-call\" fn call_mut(&mut self, args: A) -> F::Output {\n (*self).call_mut(args)\n }\n }\n\n #[stable(feature = \"rust1\", since = \"1.0.0\")]\n #[rustc_const_unstable(feature = \"const_fn_trait_ref_impls\", issue = \"101803\")]\n impl<A: Tuple, F: ?Sized> const FnOnce<A> for &mut F\n where\n F: [const] FnMut<A>,\n {\n type Output = F::Output;\n extern \"rust-call\" fn call_once(self, args: A) -> F::Output {\n (*self).call_mut(args)\n }\n }\n }\n }\n pub use self::function::{Fn, FnMut, FnOnce};\n // endregion:fn\n\n // region:async_fn\n mod async_function {\n use crate::{future::Future, marker::Tuple};\n\n #[lang = \"async_fn\"]\n #[fundamental]\n #[rustc_paren_sugar]\n pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {\n extern \"rust-call\" fn async_call(&self, args: Args) -> Self::CallRefFuture<\'_>;\n }\n\n #[lang = \"async_fn_mut\"]\n #[fundamental]\n #[rustc_paren_sugar]\n pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {\n #[lang = \"call_ref_future\"]\n type CallRefFuture<\'a>: Future<Output = Self::Output>\n where\n Self: \'a;\n extern \"rust-call\" fn async_call_mut(&mut self, args: Args) -> Self::CallRefFuture<\'_>;\n }\n\n #[lang = \"async_fn_once\"]\n #[fundamental]\n #[rustc_paren_sugar]\n pub trait AsyncFnOnce<Args: Tuple> {\n #[lang = \"async_fn_once_output\"]\n type Output;\n #[lang = \"call_once_future\"]\n type CallOnceFuture: Future<Output = Self::Output>;\n extern \"rust-call\" fn async_call_once(self, args: Args) -> Self::CallOnceFuture;\n }\n\n mod impls {\n use super::{AsyncFn, AsyncFnMut, AsyncFnOnce};\n use crate::marker::Tuple;\n\n impl<A: Tuple, F: ?Sized> AsyncFn<A> for &F\n where\n F: AsyncFn<A>,\n {\n extern \"rust-call\" fn async_call(&self, args: A) -> Self::CallRefFuture<\'_> {\n F::async_call(*self, args)\n }\n }\n\n impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &F\n where\n F: AsyncFn<A>,\n {\n type CallRefFuture<\'a>\n = F::CallRefFuture<\'a>\n where\n Self: \'a;\n\n extern \"rust-call\" fn async_call_mut(\n &mut self,\n args: A,\n ) -> Self::CallRefFuture<\'_> {\n F::async_call(*self, args)\n }\n }\n\n impl<\'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &\'a F\n where\n F: AsyncFn<A>,\n {\n type Output = F::Output;\n type CallOnceFuture = F::CallRefFuture<\'a>;\n\n extern \"rust-call\" fn async_call_once(self, args: A) -> Self::CallOnceFuture {\n F::async_call(self, args)\n }\n }\n\n impl<A: Tuple, F: ?Sized> AsyncFnMut<A> for &mut F\n where\n F: AsyncFnMut<A>,\n {\n type CallRefFuture<\'a>\n = F::CallRefFuture<\'a>\n where\n Self: \'a;\n\n extern \"rust-call\" fn async_call_mut(\n &mut self,\n args: A,\n ) -> Self::CallRefFuture<\'_> {\n F::async_call_mut(*self, args)\n }\n }\n\n impl<\'a, A: Tuple, F: ?Sized> AsyncFnOnce<A> for &\'a mut F\n where\n F: AsyncFnMut<A>,\n {\n type Output = F::Output;\n type CallOnceFuture = F::CallRefFuture<\'a>;\n\n extern \"rust-call\" fn async_call_once(self, args: A) -> Self::CallOnceFuture {\n F::async_call_mut(self, args)\n }\n }\n }\n }\n pub use self::async_function::{AsyncFn, AsyncFnMut, AsyncFnOnce};\n // endregion:async_fn\n\n // region:try\n mod try_ {\n use crate::convert::Infallible;\n\n pub enum ControlFlow<B, C = ()> {\n #[lang = \"Continue\"]\n Continue(C),\n #[lang = \"Break\"]\n Break(B),\n }\n pub trait FromResidual<R = <Self as Try>::Residual> {\n #[lang = \"from_residual\"]\n fn from_residual(residual: R) -> Self;\n }\n #[lang = \"Try\"]\n pub trait Try: FromResidual<Self::Residual> {\n type Output;\n type Residual;\n #[lang = \"from_output\"]\n fn from_output(output: Self::Output) -> Self;\n #[lang = \"branch\"]\n fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;\n }\n\n impl<B, C> Try for ControlFlow<B, C> {\n type Output = C;\n type Residual = ControlFlow<B, Infallible>;\n fn from_output(output: Self::Output) -> Self {\n ControlFlow::Continue(output)\n }\n fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {\n match self {\n ControlFlow::Continue(x) => ControlFlow::Continue(x),\n ControlFlow::Break(x) => ControlFlow::Break(ControlFlow::Break(x)),\n }\n }\n }\n\n impl<B, C> FromResidual for ControlFlow<B, C> {\n fn from_residual(residual: ControlFlow<B, Infallible>) -> Self {\n match residual {\n ControlFlow::Break(b) => ControlFlow::Break(b),\n ControlFlow::Continue(_) => loop {},\n }\n }\n }\n // region:option\n impl<T> Try for Option<T> {\n type Output = T;\n type Residual = Option<Infallible>;\n fn from_output(output: Self::Output) -> Self {\n Some(output)\n }\n fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {\n match self {\n Some(x) => ControlFlow::Continue(x),\n None => ControlFlow::Break(None),\n }\n }\n }\n\n impl<T> FromResidual for Option<T> {\n fn from_residual(x: Option<Infallible>) -> Self {\n match x {\n None => None,\n Some(_) => loop {},\n }\n }\n }\n // endregion:option\n // region:result\n // region:from\n use crate::convert::From;\n\n impl<T, E> Try for Result<T, E> {\n type Output = T;\n type Residual = Result<Infallible, E>;\n\n fn from_output(output: Self::Output) -> Self {\n Ok(output)\n }\n\n fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {\n match self {\n Ok(v) => ControlFlow::Continue(v),\n Err(e) => ControlFlow::Break(Err(e)),\n }\n }\n }\n\n impl<T, E, F: From<E>> FromResidual<Result<Infallible, E>> for Result<T, F> {\n fn from_residual(residual: Result<Infallible, E>) -> Self {\n match residual {\n Err(e) => Err(F::from(e)),\n Ok(_) => loop {},\n }\n }\n }\n // endregion:from\n // endregion:result\n }\n pub use self::try_::{ControlFlow, FromResidual, Try};\n // endregion:try\n\n // region:add\n #[lang = \"add\"]\n pub trait Add<Rhs = Self> {\n type Output;\n fn add(self, rhs: Rhs) -> Self::Output;\n }\n\n #[lang = \"add_assign\"]\n pub const trait AddAssign<Rhs = Self> {\n fn add_assign(&mut self, rhs: Rhs);\n }\n\n // region:builtin_impls\n macro_rules! add_impl {\n ($($t:ty)*) => ($(\n impl const Add for $t {\n type Output = $t;\n fn add(self, other: $t) -> $t { self + other }\n }\n impl AddAssign for $t {\n fn add_assign(&mut self, other: $t) { *self += other; }\n }\n )*)\n }\n\n add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f16 f32 f64 f128 }\n // endregion:builtin_impls\n // endregion:add\n\n // region:unary_ops\n #[lang = \"not\"]\n pub const trait Not {\n type Output;\n\n #[must_use]\n fn not(self) -> Self::Output;\n }\n\n #[lang = \"neg\"]\n pub const trait Neg {\n type Output;\n\n #[must_use = \"this returns the result of the operation, without modifying the original\"]\n fn neg(self) -> Self::Output;\n }\n // endregion:unary_ops\n\n // region:coroutine\n mod coroutine {\n use crate::pin::Pin;\n\n #[lang = \"coroutine\"]\n pub trait Coroutine<R = ()> {\n #[lang = \"coroutine_yield\"]\n type Yield;\n #[lang = \"coroutine_return\"]\n type Return;\n fn resume(self: Pin<&mut Self>, arg: R) -> CoroutineState<Self::Yield, Self::Return>;\n }\n\n #[lang = \"coroutine_state\"]\n pub enum CoroutineState<Y, R> {\n Yielded(Y),\n Complete(R),\n }\n }\n pub use self::coroutine::{Coroutine, CoroutineState};\n // endregion:coroutine\n\n // region:dispatch_from_dyn\n mod dispatch_from_dyn {\n use crate::marker::{PointeeSized, Unsize};\n\n #[lang = \"dispatch_from_dyn\"]\n pub trait DispatchFromDyn<T> {}\n\n impl<\'a, T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<&\'a U> for &\'a T {}\n\n impl<\'a, T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<&\'a mut U> for &\'a mut T {}\n\n impl<T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<*const U> for *const T {}\n\n impl<T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<*mut U> for *mut T {}\n }\n pub use self::dispatch_from_dyn::DispatchFromDyn;\n // endregion:dispatch_from_dyn\n}\n\n// region:eq\npub mod cmp {\n use crate::marker::PointeeSized;\n\n #[lang = \"eq\"]\n pub trait PartialEq<Rhs: PointeeSized = Self>: PointeeSized {\n fn eq(&self, other: &Rhs) -> bool;\n fn ne(&self, other: &Rhs) -> bool {\n !self.eq(other)\n }\n }\n\n pub trait Eq: PartialEq<Self> + PointeeSized {}\n\n // region:builtin_impls\n impl PartialEq for () {\n fn eq(&self, other: &()) -> bool { true }\n }\n // endregion:builtin_impls\n\n // region:derive\n #[rustc_builtin_macro]\n pub macro PartialEq($item:item) {}\n #[rustc_builtin_macro]\n pub macro Eq($item:item) {}\n // endregion:derive\n\n // region:ord\n #[lang = \"partial_ord\"]\n pub trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized {\n fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;\n }\n\n pub trait Ord: Eq + PartialOrd<Self> + PointeeSized {\n fn cmp(&self, other: &Self) -> Ordering;\n }\n\n pub enum Ordering {\n Less = -1,\n Equal = 0,\n Greater = 1,\n }\n\n // region:derive\n #[rustc_builtin_macro]\n pub macro PartialOrd($item:item) {}\n #[rustc_builtin_macro]\n pub macro Ord($item:item) {}\n // endregion:derive\n\n // endregion:ord\n}\n// endregion:eq\n\n// region:fmt\npub mod fmt {\n use crate::marker::PointeeSized;\n\n pub struct Error;\n pub type Result = crate::result::Result<(), Error>;\n pub struct Formatter<\'a>(&\'a ());\n pub struct DebugTuple;\n pub struct DebugStruct;\n impl Formatter<\'_> {\n pub fn debug_tuple(&mut self, _name: &str) -> DebugTuple {\n DebugTuple\n }\n\n pub fn debug_struct(&mut self, _name: &str) -> DebugStruct {\n DebugStruct\n }\n }\n\n impl DebugTuple {\n pub fn field(&mut self, _value: &dyn Debug) -> &mut Self {\n self\n }\n\n pub fn finish(&mut self) -> Result {\n Ok(())\n }\n }\n\n impl DebugStruct {\n pub fn field(&mut self, _name: &str, _value: &dyn Debug) -> &mut Self {\n self\n }\n\n pub fn finish(&mut self) -> Result {\n Ok(())\n }\n }\n\n pub trait Debug: PointeeSized {\n fn fmt(&self, f: &mut Formatter<\'_>) -> Result;\n }\n pub trait Display: PointeeSized {\n fn fmt(&self, f: &mut Formatter<\'_>) -> Result;\n }\n\n mod rt {\n use super::*;\n\n extern \"C\" {\n type Opaque;\n }\n\n #[derive(Copy, Clone)]\n #[lang = \"format_argument\"]\n pub struct Argument<\'a> {\n value: &\'a Opaque,\n formatter: fn(&Opaque, &mut Formatter<\'_>) -> Result,\n }\n\n impl<\'a> Argument<\'a> {\n pub fn new<\'b, T>(x: &\'b T, f: fn(&T, &mut Formatter<\'_>) -> Result) -> Argument<\'b> {\n use crate::mem::transmute;\n unsafe { Argument { formatter: transmute(f), value: transmute(x) } }\n }\n\n pub fn new_display<\'b, T: crate::fmt::Display>(x: &\'b T) -> Argument<\'_> {\n Self::new(x, crate::fmt::Display::fmt)\n }\n }\n\n #[lang = \"format_alignment\"]\n pub enum Alignment {\n Left,\n Right,\n Center,\n Unknown,\n }\n\n // region:fmt_before_1_93_0\n #[lang = \"format_count\"]\n pub enum Count {\n Is(usize),\n Param(usize),\n Implied,\n }\n\n #[lang = \"format_placeholder\"]\n pub struct Placeholder {\n pub position: usize,\n pub fill: char,\n pub align: Alignment,\n pub flags: u32,\n pub precision: Count,\n pub width: Count,\n }\n\n impl Placeholder {\n pub const fn new(\n position: usize,\n fill: char,\n align: Alignment,\n flags: u32,\n precision: Count,\n width: Count,\n ) -> Self {\n Placeholder { position, fill, align, flags, precision, width }\n }\n }\n // endregion:fmt_before_1_93_0\n\n // region:fmt_before_1_89_0\n #[lang = \"format_unsafe_arg\"]\n pub struct UnsafeArg {\n _private: (),\n }\n\n impl UnsafeArg {\n pub unsafe fn new() -> Self {\n UnsafeArg { _private: () }\n }\n }\n // endregion:fmt_before_1_89_0\n }\n\n // region:fmt_before_1_93_0\n #[derive(Copy, Clone)]\n #[lang = \"format_arguments\"]\n pub struct Arguments<\'a> {\n pieces: &\'a [&\'static str],\n fmt: Option<&\'a [rt::Placeholder]>,\n args: &\'a [rt::Argument<\'a>],\n }\n\n impl<\'a> Arguments<\'a> {\n pub const fn new_v1(pieces: &\'a [&\'static str], args: &\'a [Argument<\'a>]) -> Arguments<\'a> {\n Arguments { pieces, fmt: None, args }\n }\n\n pub const fn new_const(pieces: &\'a [&\'static str]) -> Arguments<\'a> {\n Arguments { pieces, fmt: None, args: &[] }\n }\n\n // region:fmt_before_1_89_0\n pub fn new_v1_formatted(\n pieces: &\'a [&\'static str],\n args: &\'a [rt::Argument<\'a>],\n fmt: &\'a [rt::Placeholder],\n _unsafe_arg: rt::UnsafeArg,\n ) -> Arguments<\'a> {\n Arguments { pieces, fmt: Some(fmt), args }\n }\n // endregion:fmt_before_1_89_0\n\n // region:!fmt_before_1_89_0\n pub unsafe fn new_v1_formatted(\n pieces: &\'a [&\'static str],\n args: &\'a [rt::Argument<\'a>],\n fmt: &\'a [rt::Placeholder],\n ) -> Arguments<\'a> {\n Arguments { pieces, fmt: Some(fmt), args }\n }\n // endregion:!fmt_before_1_89_0\n\n pub fn from_str_nonconst(s: &\'static str) -> Arguments<\'a> {\n Self::from_str(s)\n }\n\n pub const fn from_str(s: &\'static str) -> Arguments<\'a> {\n Arguments { pieces: &[s], fmt: None, args: &[] }\n }\n\n pub const fn as_str(&self) -> Option<&\'static str> {\n match (self.pieces, self.args) {\n ([], []) => Some(\"\"),\n ([s], []) => Some(s),\n _ => None,\n }\n }\n }\n // endregion:fmt_before_1_93_0\n\n // region:!fmt_before_1_93_0\n #[lang = \"format_arguments\"]\n #[derive(Copy, Clone)]\n pub struct Arguments<\'a> {\n // This is a non-faithful representation of `core::fmt::Arguments`, because the real one\n // is too complex for minicore.\n message: Option<&\'a str>,\n }\n\n impl<\'a> Arguments<\'a> {\n pub unsafe fn new<const N: usize, const M: usize>(\n _template: &\'a [u8; N],\n _args: &\'a [rt::Argument<\'a>; M],\n ) -> Arguments<\'a> {\n Arguments { message: None }\n }\n\n pub fn from_str_nonconst(s: &\'static str) -> Arguments<\'a> {\n Arguments { message: Some(s) }\n }\n\n pub const fn from_str(s: &\'static str) -> Arguments<\'a> {\n Arguments { message: Some(s) }\n }\n\n pub fn as_str(&self) -> Option<&\'static str> {\n match self.message {\n Some(s) => unsafe { Some(&*(s as *const str)) },\n None => None,\n }\n }\n }\n // endregion:!fmt_before_1_93_0\n\n // region:derive\n pub(crate) mod derive {\n #[rustc_builtin_macro]\n pub macro Debug($item:item) {}\n }\n pub use derive::Debug;\n // endregion:derive\n\n // region:builtin_impls\n macro_rules! impl_debug {\n ($($t:ty)*) => {\n $(\n impl const Debug for $t {\n fn fmt(&self, _f: &mut Formatter<\'_>) -> Result {\n Ok(())\n }\n }\n )*\n }\n }\n\n impl_debug! {\n usize u8 u16 u32 u64 u128\n isize i8 i16 i32 i64 i128\n f16 f32 f64 f128\n bool char\n }\n\n impl<T: Debug> Debug for [T] {\n fn fmt(&self, _f: &mut Formatter<\'_>) -> Result {\n Ok(())\n }\n }\n\n impl<T: Debug + PointeeSized> Debug for &T {\n fn fmt(&self, f: &mut Formatter<\'_>) -> Result {\n (&**self).fmt(f)\n }\n }\n // endregion:builtin_impls\n}\n// endregion:fmt\n\n// region:slice\npub mod slice {\n #[lang = \"slice\"]\n impl<T> [T] {\n #[lang = \"slice_len_fn\"]\n pub fn len(&self) -> usize {\n loop {}\n }\n }\n}\n// endregion:slice\n\n// region:option\npub mod option {\n pub enum Option<T> {\n #[lang = \"None\"]\n None,\n #[lang = \"Some\"]\n Some(T),\n }\n\n // region:copy\n impl<T: Copy> Copy for Option<T> {}\n // endregion:copy\n\n impl<T> Option<T> {\n pub const fn unwrap(self) -> T {\n match self {\n Some(val) => val,\n None => panic!(\"called `Option::unwrap()` on a `None` value\"),\n }\n }\n\n pub const fn as_ref(&self) -> Option<&T> {\n match self {\n Some(x) => Some(x),\n None => None,\n }\n }\n\n pub fn and<U>(self, _optb: Option<U>) -> Option<U> {\n loop {}\n }\n pub fn unwrap_or(self, default: T) -> T {\n match self {\n Some(val) => val,\n None => default,\n }\n }\n // region:result\n pub const fn ok_or<E>(self, err: E) -> Result<T, E> {\n match self {\n Some(v) => Ok(v),\n None => Err(err),\n }\n }\n // endregion:result\n // region:fn\n pub fn and_then<U, F>(self, _f: F) -> Option<U>\n where\n F: FnOnce(T) -> Option<U>,\n {\n loop {}\n }\n pub fn unwrap_or_else<F>(self, _f: F) -> T\n where\n F: FnOnce() -> T,\n {\n loop {}\n }\n pub fn map_or<U, F>(self, _default: U, _f: F) -> U\n where\n F: FnOnce(T) -> U,\n {\n loop {}\n }\n pub fn map_or_else<U, D, F>(self, _default: D, _f: F) -> U\n where\n D: FnOnce() -> U,\n F: FnOnce(T) -> U,\n {\n loop {}\n }\n // endregion:fn\n }\n}\n// endregion:option\n\n// region:result\npub mod result {\n pub enum Result<T, E> {\n #[lang = \"Ok\"]\n Ok(T),\n #[lang = \"Err\"]\n Err(E),\n }\n}\n// endregion:result\n\n// region:pin\npub mod pin {\n #[lang = \"pin\"]\n #[fundamental]\n pub struct Pin<P> {\n pointer: P,\n }\n impl<P> Pin<P> {\n pub fn new(pointer: P) -> Pin<P> {\n Pin { pointer }\n }\n }\n // region:deref\n impl<P: crate::ops::Deref> crate::ops::Deref for Pin<P> {\n type Target = P::Target;\n fn deref(&self) -> &P::Target {\n loop {}\n }\n }\n // endregion:deref\n // region:dispatch_from_dyn\n impl<Ptr, U> crate::ops::DispatchFromDyn<Pin<U>> for Pin<Ptr> where\n Ptr: crate::ops::DispatchFromDyn<U>\n {\n }\n // endregion:dispatch_from_dyn\n // region:coerce_unsized\n impl<Ptr, U> crate::ops::CoerceUnsized<Pin<U>> for Pin<Ptr> where\n Ptr: crate::ops::CoerceUnsized<U>\n {\n }\n // endregion:coerce_unsized\n}\n// endregion:pin\n\n// region:future\npub mod future {\n use crate::{\n pin::Pin,\n task::{Context, Poll},\n };\n\n #[doc(notable_trait)]\n #[lang = \"future_trait\"]\n pub trait Future {\n #[lang = \"future_output\"]\n type Output;\n #[lang = \"poll\"]\n fn poll(self: Pin<&mut Self>, cx: &mut Context<\'_>) -> Poll<Self::Output>;\n }\n\n pub trait IntoFuture {\n type Output;\n type IntoFuture: Future<Output = Self::Output>;\n #[lang = \"into_future\"]\n fn into_future(self) -> Self::IntoFuture;\n }\n\n impl<F: Future> IntoFuture for F {\n type Output = F::Output;\n type IntoFuture = F;\n fn into_future(self) -> F {\n self\n }\n }\n}\npub mod task {\n pub enum Poll<T> {\n #[lang = \"Ready\"]\n Ready(T),\n #[lang = \"Pending\"]\n Pending,\n }\n\n pub struct Context<\'a> {\n waker: &\'a (),\n }\n}\n// endregion:future\n\n// region:iterator\npub mod iter {\n // region:iterators\n mod adapters {\n pub struct Take<I> {\n iter: I,\n n: usize,\n }\n impl<I> Iterator for Take<I>\n where\n I: Iterator,\n {\n type Item = <I as Iterator>::Item;\n\n fn next(&mut self) -> Option<<I as Iterator>::Item> {\n loop {}\n }\n }\n\n pub struct FilterMap<I, F> {\n iter: I,\n f: F,\n }\n impl<B, I: Iterator, F> Iterator for FilterMap<I, F>\n where\n F: FnMut(I::Item) -> Option<B>,\n {\n type Item = B;\n\n #[inline]\n fn next(&mut self) -> Option<B> {\n loop {}\n }\n }\n }\n pub use self::adapters::{FilterMap, Take};\n\n mod sources {\n mod repeat {\n pub fn repeat<T>(_elt: T) -> Repeat<T> {\n loop {}\n }\n\n pub struct Repeat<A> {\n element: A,\n }\n\n impl<A> Iterator for Repeat<A> {\n type Item = A;\n\n fn next(&mut self) -> Option<A> {\n loop {}\n }\n }\n }\n pub use self::repeat::{Repeat, repeat};\n }\n pub use self::sources::{Repeat, repeat};\n // endregion:iterators\n\n mod traits {\n mod iterator {\n use crate::marker::PointeeSized;\n\n #[doc(notable_trait)]\n #[lang = \"iterator\"]\n pub trait Iterator {\n type Item;\n #[lang = \"next\"]\n fn next(&mut self) -> Option<Self::Item>;\n fn nth(&mut self, n: usize) -> Option<Self::Item> {\n loop {}\n }\n fn by_ref(&mut self) -> &mut Self\n where\n Self: Sized,\n {\n self\n }\n // region:iterators\n fn take(self, n: usize) -> crate::iter::Take<Self>\n where\n Self: Sized,\n {\n loop {}\n }\n fn filter_map<B, F>(self, _f: F) -> crate::iter::FilterMap<Self, F>\n where\n Self: Sized,\n F: FnMut(Self::Item) -> Option<B>,\n {\n loop {}\n }\n fn collect<B: FromIterator<Self::Item>>(self) -> B\n where\n Self: Sized,\n {\n loop {}\n }\n // endregion:iterators\n }\n impl<I: Iterator + PointeeSized> Iterator for &mut I {\n type Item = I::Item;\n fn next(&mut self) -> Option<I::Item> {\n (**self).next()\n }\n }\n }\n pub use self::iterator::Iterator;\n\n mod collect {\n pub trait IntoIterator {\n type Item;\n type IntoIter: Iterator<Item = Self::Item>;\n #[lang = \"into_iter\"]\n fn into_iter(self) -> Self::IntoIter;\n }\n impl<I: Iterator> IntoIterator for I {\n type Item = I::Item;\n type IntoIter = I;\n fn into_iter(self) -> I {\n self\n }\n }\n struct IndexRange {\n start: usize,\n end: usize,\n }\n pub struct IntoIter<T, const N: usize> {\n data: [T; N],\n range: IndexRange,\n }\n impl<T, const N: usize> IntoIterator for [T; N] {\n type Item = T;\n type IntoIter = IntoIter<T, N>;\n fn into_iter(self) -> Self::IntoIter {\n IntoIter { data: self, range: IndexRange { start: 0, end: loop {} } }\n }\n }\n impl<T, const N: usize> Iterator for IntoIter<T, N> {\n type Item = T;\n fn next(&mut self) -> Option<T> {\n loop {}\n }\n }\n pub struct Iter<\'a, T> {\n slice: &\'a [T],\n }\n impl<\'a, T> IntoIterator for &\'a [T; N] {\n type Item = &\'a T;\n type IntoIter = Iter<\'a, T>;\n fn into_iter(self) -> Self::IntoIter {\n loop {}\n }\n }\n impl<\'a, T> IntoIterator for &\'a [T] {\n type Item = &\'a T;\n type IntoIter = Iter<\'a, T>;\n fn into_iter(self) -> Self::IntoIter {\n loop {}\n }\n }\n impl<\'a, T> Iterator for Iter<\'a, T> {\n type Item = &\'a T;\n fn next(&mut self) -> Option<T> {\n loop {}\n }\n }\n pub trait FromIterator<A>: Sized {\n fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self;\n }\n }\n pub use self::collect::{IntoIterator, FromIterator};\n }\n pub use self::traits::{IntoIterator, FromIterator, Iterator};\n}\n// endregion:iterator\n\n// region:str\npub mod str {\n pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {\n \"\"\n }\n pub trait FromStr: Sized {\n type Err;\n fn from_str(s: &str) -> Result<Self, Self::Err>;\n }\n impl str {\n pub fn parse<F: FromStr>(&self) -> Result<F, F::Err> {\n FromStr::from_str(self)\n }\n }\n}\n// endregion:str\n\n// region:panic\nmod panic {\n pub macro panic_2021 {\n () => ({\n const fn panic_cold_explicit() -> ! {\n $crate::panicking::panic_explicit()\n }\n panic_cold_explicit();\n }),\n // Special-case the single-argument case for const_panic.\n (\"{}\", $arg:expr $(,)?) => ({\n #[rustc_const_panic_str] // enforce a &&str argument in const-check and hook this by const-eval\n #[rustc_do_not_const_check] // hooked by const-eval\n const fn panic_cold_display<T: $crate::fmt::Display>(arg: &T) -> ! {\n $crate::panicking::panic_display(arg)\n }\n panic_cold_display(&$arg);\n }),\n ($($t:tt)+) => ({\n // Semicolon to prevent temporaries inside the formatting machinery from\n // being considered alive in the caller after the panic_fmt call.\n $crate::panicking::panic_fmt($crate::const_format_args!($($t)+));\n }),\n }\n}\n\nmod panicking {\n #[rustc_const_panic_str] // enforce a &&str argument in const-check and hook this by const-eval\n pub const fn panic_display<T: crate::fmt::Display>(x: &T) -> ! {\n panic_fmt(crate::format_args!(\"{}\", *x));\n }\n\n // This function is used instead of panic_fmt in const eval.\n #[lang = \"const_panic_fmt\"]\n pub const fn const_panic_fmt(fmt: crate::fmt::Arguments<\'_>) -> ! {\n if let Some(msg) = fmt.as_str() {\n // The panic_display function is hooked by const eval.\n panic_display(&msg);\n } else {\n loop {}\n }\n }\n\n #[lang = \"panic_fmt\"] // needed for const-evaluated panics\n pub const fn panic_fmt(fmt: crate::fmt::Arguments<\'_>) -> ! {\n loop {}\n }\n\n #[lang = \"panic\"]\n pub const fn panic(expr: &\'static str) -> ! {\n panic_fmt(crate::fmt::Arguments::from_str(expr))\n }\n}\n// endregion:panic\n\n// region:asm\nmod arch {\n #[rustc_builtin_macro]\n pub macro asm(\"assembly template\", $(operands,)* $(options($(option),*))?) {\n /* compiler built-in */\n }\n #[rustc_builtin_macro]\n pub macro global_asm(\"assembly template\", $(operands,)* $(options($(option),*))?) {\n /* compiler built-in */\n }\n}\n// endregion:asm\n\n#[macro_use]\nmod macros {\n // region:panic\n #[macro_export]\n #[rustc_builtin_macro(core_panic)]\n macro_rules! panic {\n ($($arg:tt)*) => {\n /* compiler built-in */\n };\n }\n // endregion:panic\n\n // region:write\n #[macro_export]\n macro_rules! write {\n ($dst:expr, $($arg:tt)*) => {\n $dst.write_fmt($crate::format_args!($($arg)*))\n };\n }\n\n #[macro_export]\n #[allow_internal_unstable(format_args_nl)]\n macro_rules! writeln {\n ($dst:expr $(,)?) => {\n $crate::write!($dst, \"\\n\")\n };\n ($dst:expr, $($arg:tt)*) => {\n $dst.write_fmt($crate::format_args_nl!($($arg)*))\n };\n }\n // endregion:write\n\n // region:assert\n #[macro_export]\n #[rustc_builtin_macro]\n #[allow_internal_unstable(core_panic, edition_panic, generic_assert_internals)]\n macro_rules! assert {\n ($($arg:tt)*) => {\n /* compiler built-in */\n };\n }\n // endregion:assert\n\n // region:fmt\n #[allow_internal_unstable(fmt_internals, const_fmt_arguments_new)]\n #[macro_export]\n #[rustc_builtin_macro]\n macro_rules! const_format_args {\n ($fmt:expr) => {{ /* compiler built-in */ }};\n ($fmt:expr, $($args:tt)*) => {{ /* compiler built-in */ }};\n }\n\n #[allow_internal_unstable(fmt_internals)]\n #[macro_export]\n #[rustc_builtin_macro]\n macro_rules! format_args {\n ($fmt:expr) => {{ /* compiler built-in */ }};\n ($fmt:expr, $($args:tt)*) => {{ /* compiler built-in */ }};\n }\n\n #[allow_internal_unstable(fmt_internals)]\n #[macro_export]\n #[rustc_builtin_macro]\n macro_rules! format_args_nl {\n ($fmt:expr) => {{ /* compiler built-in */ }};\n ($fmt:expr, $($args:tt)*) => {{ /* compiler built-in */ }};\n }\n\n #[macro_export]\n macro_rules! print {\n ($($arg:tt)*) => {{\n $crate::io::_print($crate::format_args!($($arg)*));\n }};\n }\n\n // endregion:fmt\n\n // region:todo\n #[macro_export]\n #[allow_internal_unstable(core_panic)]\n macro_rules! todo {\n () => {\n $crate::panicking::panic(\"not yet implemented\")\n };\n ($($arg:tt)+) => {\n $crate::panic!(\"not yet implemented: {}\", $crate::format_args!($($arg)+))\n };\n }\n // endregion:todo\n\n // region:unimplemented\n #[macro_export]\n #[allow_internal_unstable(core_panic)]\n macro_rules! unimplemented {\n () => {\n $crate::panicking::panic(\"not implemented\")\n };\n ($($arg:tt)+) => {\n $crate::panic!(\"not implemented: {}\", $crate::format_args!($($arg)+))\n };\n }\n // endregion:unimplemented\n\n // region:derive\n pub(crate) mod builtin {\n #[rustc_builtin_macro]\n pub macro derive($item:item) {\n /* compiler built-in */\n }\n\n #[rustc_builtin_macro]\n pub macro derive_const($item:item) {\n /* compiler built-in */\n }\n }\n // endregion:derive\n\n // region:include\n #[rustc_builtin_macro]\n #[macro_export]\n macro_rules! include {\n ($file:expr $(,)?) => {{ /* compiler built-in */ }};\n }\n // endregion:include\n\n // region:concat\n #[rustc_builtin_macro]\n #[macro_export]\n macro_rules! concat {}\n // endregion:concat\n\n // region:env\n #[rustc_builtin_macro]\n #[macro_export]\n macro_rules! env {}\n #[rustc_builtin_macro]\n #[macro_export]\n macro_rules! option_env {}\n // endregion:env\n}\n\n// region:non_zero\npub mod num {\n #[repr(transparent)]\n #[rustc_layout_scalar_valid_range_start(1)]\n #[rustc_nonnull_optimization_guaranteed]\n pub struct NonZeroU8(u8);\n}\n// endregion:non_zero\n\n// region:bool_impl\n#[lang = \"bool\"]\nimpl bool {\n pub fn then_some<T>(self, t: T) -> Option<T> {\n if self { Some(t) } else { None }\n }\n\n pub fn then<T, F: FnOnce() -> T>(self, f: F) -> Option<T> {\n if self { Some(f()) } else { None }\n }\n}\n// endregion:bool_impl\n\n// region:int_impl\nmacro_rules! impl_int {\n ($($t:ty)*) => {\n $(\n impl $t {\n pub const fn from_ne_bytes(bytes: [u8; size_of::<Self>()]) -> Self {\n unsafe { mem::transmute(bytes) }\n }\n }\n )*\n }\n}\n\nimpl_int! {\n usize u8 u16 u32 u64 u128\n isize i8 i16 i32 i64 i128\n}\n// endregion:int_impl\n\n// region:error\npub mod error {\n #[rustc_has_incoherent_inherent_impls]\n pub trait Error: crate::fmt::Debug + crate::fmt::Display {\n fn source(&self) -> Option<&(dyn Error + \'static)> {\n None\n }\n }\n}\n// endregion:error\n\n// region:column\n#[rustc_builtin_macro]\n#[macro_export]\nmacro_rules! column {\n () => {};\n}\n// endregion:column\n\npub mod prelude {\n pub mod v1 {\n pub use crate::{\n clone::Clone, // :clone\n cmp::{Eq, PartialEq}, // :eq\n cmp::{Ord, PartialOrd}, // :ord\n convert::AsMut, // :as_mut\n convert::AsRef, // :as_ref\n convert::{From, Into, TryFrom, TryInto}, // :from\n default::Default, // :default\n iter::{IntoIterator, Iterator, FromIterator}, // :iterator\n macros::builtin::{derive, derive_const}, // :derive\n marker::Copy, // :copy\n marker::Send, // :send\n marker::Sized, // :sized\n marker::Sync, // :sync\n mem::drop, // :drop\n mem::size_of, // :size_of\n ops::Drop, // :drop\n ops::{AsyncFn, AsyncFnMut, AsyncFnOnce}, // :async_fn\n ops::{Fn, FnMut, FnOnce}, // :fn\n option::Option::{self, None, Some}, // :option\n panic, // :panic\n result::Result::{self, Err, Ok}, // :result\n str::FromStr, // :str\n fmt::derive::Debug, // :fmt, derive\n hash::derive::Hash, // :hash, derive\n };\n }\n\n pub mod rust_2015 {\n pub use super::v1::*;\n }\n\n pub mod rust_2018 {\n pub use super::v1::*;\n }\n\n pub mod rust_2021 {\n pub use super::v1::*;\n }\n\n pub mod rust_2024 {\n pub use super::v1::*;\n }\n}\n\n#[prelude_import]\n#[allow(unused)]\nuse prelude::v1::*;\n"</h4></section><section id="method.from_flags" class="method"><a class="src rightside" href="../src/test_utils/fixture.rs.html#362-367">Source</a><h4 class="code-header">pub fn <a href="#method.from_flags" class="fn">from_flags</a><'a>(flags: impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = &'a <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.str.html">str</a>>) -> Self</h4></section><section id="method.available_flags" class="method"><a class="src rightside" href="../src/test_utils/fixture.rs.html#389-396">Source</a><h4 class="code-header">pub fn <a href="#method.available_flags" class="fn">available_flags</a>(raw_source: &<a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.str.html">str</a>) -> impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = &<a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.str.html">str</a>></h4></section><details class="toggle method-toggle" open><summary><section id="method.source_code" class="method"><a class="src rightside" href="../src/test_utils/fixture.rs.html#401-527">Source</a><h4 class="code-header">pub fn <a href="#method.source_code" class="fn">source_code</a>(self, raw_source: &<a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.str.html">str</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Strips parts of minicore.rs which are flagged by inactive flags.</p>
|
|
<p>This is probably over-engineered to support flags dependencies.</p>
|
|
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-MiniCore" class="impl"><a class="src rightside" href="../src/test_utils/fixture.rs.html#145">Source</a><a href="#impl-Debug-for-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/test_utils/fixture.rs.html#145">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.92.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.92.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-MiniCore" class="impl"><a href="#impl-Freeze-for-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section><section id="impl-RefUnwindSafe-for-MiniCore" class="impl"><a href="#impl-RefUnwindSafe-for-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section><section id="impl-Send-for-MiniCore" class="impl"><a href="#impl-Send-for-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section><section id="impl-Sync-for-MiniCore" class="impl"><a href="#impl-Sync-for-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section><section id="impl-Unpin-for-MiniCore" class="impl"><a href="#impl-Unpin-for-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section><section id="impl-UnwindSafe-for-MiniCore" class="impl"><a href="#impl-UnwindSafe-for-MiniCore" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.MiniCore.html" title="struct test_utils::MiniCore">MiniCore</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
|
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
|
T: ?<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
|
T: ?<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
|
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
|
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
|
U: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
|
<p>That is, this conversion is whatever the implementation of
|
|
<code><a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoBox%3Cdyn+Any%3E-for-T" class="impl"><a href="#impl-IntoBox%3Cdyn+Any%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> IntoBox<dyn <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>> for T<div class="where">where
|
|
T: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_box" class="method trait-impl"><a href="#method.into_box" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into_box</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>></h4></section></summary><div class='docblock'>Convert self into the appropriate boxed form.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoBox%3Cdyn+Any+%2B+Send%3E-for-T" class="impl"><a href="#impl-IntoBox%3Cdyn+Any+%2B+Send%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> IntoBox<dyn <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>> for T<div class="where">where
|
|
T: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_box-1" class="method trait-impl"><a href="#method.into_box-1" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into_box</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>></h4></section></summary><div class='docblock'>Convert self into the appropriate boxed form.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoBox%3Cdyn+Any+%2B+Send+%2B+Sync%3E-for-T" class="impl"><a href="#impl-IntoBox%3Cdyn+Any+%2B+Send+%2B+Sync%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> IntoBox<dyn <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>> for T<div class="where">where
|
|
T: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_box-2" class="method trait-impl"><a href="#method.into_box-2" class="anchor">§</a><h4 class="code-header">fn <a class="fn">into_box</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>></h4></section></summary><div class='docblock'>Convert self into the appropriate boxed form.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-IntoEither-for-T" class="impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#64">Source</a><a href="#impl-IntoEither-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html" title="trait either::into_either::IntoEither">IntoEither</a> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into_either" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#29">Source</a><a href="#method.into_either" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either" class="fn">into_either</a>(self, into_left: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self></h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|
if <code>into_left</code> is <code>true</code>.
|
|
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.into_either_with" class="method trait-impl"><a class="src rightside" href="https://docs.rs/either/1/src/either/into_either.rs.html#55-57">Source</a><a href="#method.into_either_with" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with" class="fn">into_either_with</a><F>(self, into_left: F) -> <a class="enum" href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either">Either</a><Self, Self><div class="where">where
|
|
F: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><div class='docblock'>Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Left" title="variant either::Either::Left"><code>Left</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|
if <code>into_left(&self)</code> returns <code>true</code>.
|
|
Converts <code>self</code> into a <a href="https://docs.rs/either/1/either/enum.Either.html#variant.Right" title="variant either::Either::Right"><code>Right</code></a> variant of <a href="https://docs.rs/either/1/either/enum.Either.html" title="enum either::Either"><code>Either<Self, Self></code></a>
|
|
otherwise. <a href="https://docs.rs/either/1/either/into_either/trait.IntoEither.html#method.into_either_with">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
|
U: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
|
U: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl<T> WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a><S>(self, subscriber: S) -> WithDispatch<Self><div class="where">where
|
|
S: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><Dispatch>,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -> WithDispatch<Self></h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div></section></div></main></body></html> |