-
-
Notifications
You must be signed in to change notification settings - Fork 82
Can currently leak private types and values #309
Copy link
Copy link
Closed
Labels
exp: lowAchievable with little prior knowledge and guidanceAchievable with little prior knowledge and guidancegood first issueGood for newcomersGood for newcomerspri: lowAn issue with no impact to quality, performance, or functionalityAn issue with no impact to quality, performance, or functionality
Description
Reexporting a type or value from one module to another should check the visibility of the original item.
This can happen in a few cases:
//- foo.mun
// Illegal, Bar has a smaller scope that this use statement
pub(super) struct Bar;
// Illegal, Bar has a smaller scope than this function
pub fn baz() -> Bar {
}//- mod.mun
pub use foo::Bar; // Should be illegal because Bar is only visible to this moduleIn rust this emits the error: can't leak private type. This is currently not checked in Mun.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
exp: lowAchievable with little prior knowledge and guidanceAchievable with little prior knowledge and guidancegood first issueGood for newcomersGood for newcomerspri: lowAn issue with no impact to quality, performance, or functionalityAn issue with no impact to quality, performance, or functionality