Resolve enum field visibility correctly

Previously, this code treated enum fields' visibility as if they were
struct fields. However, that's not correct because the visibility of a
struct field with `ast::VisibilityKind::Inherited` is private to the
module it's defined in, whereas the visibility of an *enum* field with
`ast::VisibilityKind::Inherited` is the visibility of the enum it
belongs to.
This commit is contained in:
Camelid 2020-12-11 19:52:51 -08:00
parent 2225ee1b62
commit 5ce3f4c166
5 changed files with 75 additions and 3 deletions

View file

@ -403,6 +403,7 @@ enum PathResult<'a> {
},
}
#[derive(Debug)]
enum ModuleKind {
/// An anonymous module; e.g., just a block.
///