Enum rustc_infer::infer::RegionckMode
source · [−]pub enum RegionckMode {
Solve,
Erase {
suppress_errors: bool,
},
}Expand description
How we should handle region solving.
This is used so that the region values inferred by HIR region solving are not exposed, and so that we can avoid doing work in HIR typeck that MIR typeck will also do.
Variants
Solve
The default mode: report region errors, don’t erase regions.
Erase
Fields
suppress_errors: boolA flag that is used to suppress region errors, when we are doing region checks that the NLL borrow checker will also do – it might be set to true.
Erase the results of region after solving.
Implementations
sourceimpl RegionckMode
impl RegionckMode
sourcepub fn for_item_body(tcx: TyCtxt<'_>) -> Self
pub fn for_item_body(tcx: TyCtxt<'_>) -> Self
Indicates that the MIR borrowck will repeat these region checks, so we should ignore errors if NLL is (unconditionally) enabled.
Trait Implementations
sourceimpl Clone for RegionckMode
impl Clone for RegionckMode
sourcefn clone(&self) -> RegionckMode
fn clone(&self) -> RegionckMode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for RegionckMode
impl Debug for RegionckMode
sourceimpl Default for RegionckMode
impl Default for RegionckMode
sourcefn default() -> RegionckMode
fn default() -> RegionckMode
Returns the “default value” for a type. Read more
impl Copy for RegionckMode
Auto Trait Implementations
impl RefUnwindSafe for RegionckMode
impl Send for RegionckMode
impl Sync for RegionckMode
impl Unpin for RegionckMode
impl UnwindSafe for RegionckMode
Blanket Implementations
sourceimpl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
pub fn allocate_on(self, arena: &'a Arena<'tcx>) -> &'a mut T
pub fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Solve: 0 bytesErase: 1 byte