Struct rustc_borrowck::diagnostics::region_name::RegionName
source · [−]pub(crate) struct RegionName {
pub(crate) name: Symbol,
pub(crate) source: RegionNameSource,
}Expand description
A name for a particular region used in emitting diagnostics. This name could be a generated
name like '1, a name used by the user like 'a, or a name like 'static.
Fields
name: SymbolThe name of the region (interned).
source: RegionNameSourceWhere the region comes from.
Implementations
sourceimpl RegionName
impl RegionName
pub(crate) fn was_named(&self) -> bool
pub(crate) fn span(&self) -> Option<Span>
pub(crate) fn highlight_region_name(&self, diag: &mut DiagnosticBuilder<'_>)
Trait Implementations
sourceimpl Clone for RegionName
impl Clone for RegionName
sourcefn clone(&self) -> RegionName
fn clone(&self) -> RegionName
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 RegionName
impl Debug for RegionName
Auto Trait Implementations
impl RefUnwindSafe for RegionName
impl !Send for RegionName
impl !Sync for RegionName
impl Unpin for RegionName
impl UnwindSafe for RegionName
Blanket Implementations
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
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: 80 bytes