Struct rustc_mir_build::thir::pattern::const_to_pat::fallback_to_const_ref::FallbackToConstRef [−][src]
pub(super) struct FallbackToConstRef(());
Expand description
This error type signals that we encountered a non-struct-eq situation behind a reference.
We bubble this up in order to get back to the reference destructuring and make that emit
a const pattern instead of a deref pattern. This allows us to simply call PartialEq::eq
on such patterns (since that function takes a reference) and not have to jump through any
hoops to get a reference to the value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FallbackToConstRef
impl Send for FallbackToConstRef
impl Sync for FallbackToConstRef
impl Unpin for FallbackToConstRef
impl UnwindSafe for FallbackToConstRef
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,