Skip to main content

ScopedVisitor

Trait ScopedVisitor 

Source
pub(crate) trait ScopedVisitor<'genv, 'tcx: 'genv>: Sized {
    // Required methods
    fn resolver(&self) -> &CrateResolver<'genv, 'tcx>;
    fn enter_scope(&mut self, scope: &Scope<'_>);
    fn exit_scope(&mut self, scope: &Scope<'_>);

    // Provided methods
    fn wrap(self) -> ScopedVisitorWrapper<Self> { ... }
    fn on_implicit_param(
        &mut self,
        _ident: Ident,
        _kind: ParamKind,
        _node_id: NodeId,
    ) { ... }
    fn on_path<S: Segment>(
        &mut self,
        _segments: &[S],
        _node_id: NodeId,
        _span: Span,
    ) { ... }
    fn on_sort_path(&mut self, _path: &SortPath) { ... }
}

Required Methods§

Source

fn resolver(&self) -> &CrateResolver<'genv, 'tcx>

Source

fn enter_scope(&mut self, scope: &Scope<'_>)

Source

fn exit_scope(&mut self, scope: &Scope<'_>)

Provided Methods§

Source

fn wrap(self) -> ScopedVisitorWrapper<Self>

Source

fn on_implicit_param( &mut self, _ident: Ident, _kind: ParamKind, _node_id: NodeId, )

Source

fn on_path<S: Segment>( &mut self, _segments: &[S], _node_id: NodeId, _span: Span, )

Source

fn on_sort_path(&mut self, _path: &SortPath)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'genv, 'tcx> ScopedVisitor<'genv, 'tcx> for ImplicitParamCollector<'_, 'genv, 'tcx>

Source§

impl<'genv, 'tcx> ScopedVisitor<'genv, 'tcx> for RefinementResolver<'_, 'genv, 'tcx>