gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

Handle pub(restricted) properly

Open CohenArthur opened this issue 2 years ago • 0 comments

We need to add a visitor to allow handling of the various pub variations. pub(restricted) is interesting as it has a direct effect on surrounding modules: You can specify that a parent module, but not its parents, is allowed to view a certain item publicly

mod a {
  struct AStruct {
    inner: BStruct,
  }

  mod b {
    pub(in crate::a) struct BStruct;
  }
}

So we need to figure out a way to affect an HIR node's parents properly

CohenArthur avatar Mar 31 '22 09:03 CohenArthur