Skip to content

Type alias visibility & leaking #339

@mkhan45

Description

@mkhan45

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions