pub struct FlattenedScopeCache { /* private fields */ }Expand description
Pre-computed visible scope for each file.
Scope = own symbols + public symbols from imported files transitively. Local symbols take priority over imported (shadowing).
Implementations§
Source§impl FlattenedScopeCache
impl FlattenedScopeCache
Sourcepub fn build(ctx: &ResolutionContext, diagnostics: &mut Vec<Diagnostic>) -> Self
pub fn build(ctx: &ResolutionContext, diagnostics: &mut Vec<Diagnostic>) -> Self
Build the scope cache from the file->symbols index and import adjacency.
For each file, BFS over import edges, collecting public symbols from reachable files. Confidence decays with distance:
- 1.0: own file or direct import, same language
- 0.8: transitive import, same language
- 0.6: cross-language imports
Auto Trait Implementations§
impl Freeze for FlattenedScopeCache
impl RefUnwindSafe for FlattenedScopeCache
impl Send for FlattenedScopeCache
impl Sync for FlattenedScopeCache
impl Unpin for FlattenedScopeCache
impl UnsafeUnpin for FlattenedScopeCache
impl UnwindSafe for FlattenedScopeCache
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more