pub struct DebugScope<S, L> {
    pub dbg_scope: S,
    pub inlined_at: Option<L>,
    pub file_start_pos: BytePos,
    pub file_end_pos: BytePos,
}

Fields§

§dbg_scope: S§inlined_at: Option<L>

Call site location, if this scope was inlined from another function.

§file_start_pos: BytePos§file_end_pos: BytePos

Implementations§

source§

impl<'tcx, S: Copy, L: Copy> DebugScope<S, L>

source

pub fn adjust_dbg_scope_for_span<Cx: CodegenMethods<'tcx, DIScope = S, DILocation = L>>( &self, cx: &Cx, span: Span ) -> S

DILocations inherit source file name from the parent DIScope. Due to macro expansions it may so happen that the current span belongs to a different file than the DIScope corresponding to span’s containing source scope. If so, we need to create a DIScope “extension” into that file.

Trait Implementations§

source§

impl<S: Clone, L: Clone> Clone for DebugScope<S, L>

source§

fn clone(&self) -> DebugScope<S, L>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S: Debug, L: Debug> Debug for DebugScope<S, L>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S: Copy, L: Copy> Copy for DebugScope<S, L>

Auto Trait Implementations§

§

impl<S, L> RefUnwindSafe for DebugScope<S, L>where L: RefUnwindSafe, S: RefUnwindSafe,

§

impl<S, L> Send for DebugScope<S, L>where L: Send, S: Send,

§

impl<S, L> Sync for DebugScope<S, L>where L: Sync, S: Sync,

§

impl<S, L> Unpin for DebugScope<S, L>where L: Unpin, S: Unpin,

§

impl<S, L> UnwindSafe for DebugScope<S, L>where L: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.