-
-
Notifications
You must be signed in to change notification settings - Fork 82
Type alias visibility & leaking #339
Copy link
Copy link
Closed
Description
In Rust, private type aliases can still be used in public function signatures so long as the type they represent is public:
type Foo = usize;
// usize is public, so this is perfectly valid
pub fn foo() -> Foo {
1
}
fn main() {
println!("{}", foo());
}With #338, this behavior is the same in Mun, but we may want to change it so that we would get a "can't leak private type" error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: fixBug fix or reportBug fix or report