#[non_exhaustive]pub struct ScopeGraph {
pub scopes: Vec<ScopeFrame>,
pub bindings: Vec<Binding>,
pub references: Vec<BindingReference>,
}Expand description
HIR-local scope graph for compiler-substrate proof.
The graph is intentionally parser-core-local. Later compiler fact export can
map these ids to perl-semantic-facts ids without changing provider
behavior in this first scope/pad slice.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.scopes: Vec<ScopeFrame>Scope frames in stable creation order.
bindings: Vec<Binding>Bindings in stable declaration order.
references: Vec<BindingReference>Variable references observed while lowering.
Implementations§
Source§impl ScopeGraph
impl ScopeGraph
Sourcepub fn root_scope(&self) -> Option<&ScopeFrame>
pub fn root_scope(&self) -> Option<&ScopeFrame>
Return the root file scope, when present.
Trait Implementations§
Source§impl Clone for ScopeGraph
impl Clone for ScopeGraph
Source§fn clone(&self) -> ScopeGraph
fn clone(&self) -> ScopeGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScopeGraph
impl Debug for ScopeGraph
Source§impl Default for ScopeGraph
impl Default for ScopeGraph
Source§fn default() -> ScopeGraph
fn default() -> ScopeGraph
Returns the “default value” for a type. Read more
Source§impl PartialEq for ScopeGraph
impl PartialEq for ScopeGraph
Source§fn eq(&self, other: &ScopeGraph) -> bool
fn eq(&self, other: &ScopeGraph) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ScopeGraph
impl StructuralPartialEq for ScopeGraph
Auto Trait Implementations§
impl Freeze for ScopeGraph
impl RefUnwindSafe for ScopeGraph
impl Send for ScopeGraph
impl Sync for ScopeGraph
impl Unpin for ScopeGraph
impl UnsafeUnpin for ScopeGraph
impl UnwindSafe for ScopeGraph
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