pub struct NestedStmtSpans(/* private fields */);Expand description
Where each statement read inside a block sits in the source — a function’s
body, a loop’s, a branch’s — by StmtId. Top-level statements are in
Parser::stmt_spans instead: they live in the returned Vec, whose buffer
may be freed and reused, while a block lives in the arena for as long as the
AST does. A statement the parser wrote itself (a desugaring’s) has no entry,
so a finding in it falls back to the statement the author wrote around it.
Implementations§
Trait Implementations§
Source§impl Clone for NestedStmtSpans
impl Clone for NestedStmtSpans
Source§fn clone(&self) -> NestedStmtSpans
fn clone(&self) -> NestedStmtSpans
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 NestedStmtSpans
impl Debug for NestedStmtSpans
Source§impl Default for NestedStmtSpans
impl Default for NestedStmtSpans
Source§fn default() -> NestedStmtSpans
fn default() -> NestedStmtSpans
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NestedStmtSpans
impl RefUnwindSafe for NestedStmtSpans
impl Send for NestedStmtSpans
impl Sync for NestedStmtSpans
impl Unpin for NestedStmtSpans
impl UnsafeUnpin for NestedStmtSpans
impl UnwindSafe for NestedStmtSpans
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