pub enum SyntheticItem {
Array,
Slice,
Tuple(usize),
}Expand description
We create some extra DefIds to represent things that rustc doesn’t have a DefId for. This
makes the pipeline much easier to have “real” def_ids for them.
We generate fake struct-like items for each of: arrays, slices, and tuples. This makes it
easier to emit trait impls for these types, especially with monomorphization. This enum tracks
identifies these builtin types.
Variants§
Array
Fake ADT representing the [T; N] type.
Slice
Fake ADT representing the [T] type.
Tuple(usize)
Fake ADT representing the length-n tuple (A, B, ...).
Trait Implementations§
Source§impl Clone for SyntheticItem
impl Clone for SyntheticItem
Source§fn clone(&self) -> SyntheticItem
fn clone(&self) -> SyntheticItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyntheticItem
impl Debug for SyntheticItem
Source§impl Hash for SyntheticItem
impl Hash for SyntheticItem
Source§impl PartialEq for SyntheticItem
impl PartialEq for SyntheticItem
impl Copy for SyntheticItem
impl Eq for SyntheticItem
impl StructuralPartialEq for SyntheticItem
Auto Trait Implementations§
impl Freeze for SyntheticItem
impl RefUnwindSafe for SyntheticItem
impl Send for SyntheticItem
impl Sync for SyntheticItem
impl Unpin for SyntheticItem
impl UnwindSafe for SyntheticItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more