Struct rustc_resolve::access_levels::AccessLevelsVisitor
source · [−]pub struct AccessLevelsVisitor<'r, 'a> {
r: &'r mut Resolver<'a>,
prev_level: Option<AccessLevel>,
changed: bool,
}Fields
r: &'r mut Resolver<'a>prev_level: Option<AccessLevel>changed: boolImplementations
Fills the Resolver::access_levels table with public & exported items
For now, this doesn’t resolve macros (FIXME) and cannot resolve Impl, as we
need access to a TyCtxt for that.
Update the access level of the exports of the given module accordingly. The module access
level has to be Exported or Public.
This will also follow use chains (see PrivacyVisitor::set_import_binding_access_level).
fn set_access_level(
&mut self,
node_id: NodeId,
access_level: Option<AccessLevel>
) -> Option<AccessLevel>
fn set_access_level(
&mut self,
node_id: NodeId,
access_level: Option<AccessLevel>
) -> Option<AccessLevel>
Sets the access level of the LocalDefId corresponding to the given NodeId.
This function will panic if the NodeId does not have a LocalDefId
fn set_access_level_def_id(
&mut self,
def_id: LocalDefId,
access_level: Option<AccessLevel>
) -> Option<AccessLevel>
Trait Implementations
fn visit_enum_def(
&mut self,
enum_definition: &EnumDef,
generics: &Generics,
item_id: NodeId,
Span
)
Auto Trait Implementations
impl<'r, 'a> !RefUnwindSafe for AccessLevelsVisitor
impl<'r, 'a> !Send for AccessLevelsVisitor
impl<'r, 'a> !Sync for AccessLevelsVisitor
impl<'r, 'a> Unpin for AccessLevelsVisitor where
'a: 'r,
impl<'r, 'a> !UnwindSafe for AccessLevelsVisitor
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes