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:
parent
2225ee1b62
commit
5ce3f4c166
5 changed files with 75 additions and 3 deletions
|
@ -403,6 +403,7 @@ enum PathResult<'a> {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum ModuleKind {
|
||||
/// An anonymous module; e.g., just a block.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue