Skip to content

impl priv methods are not private #4629

@cpeterso

Description

@cpeterso

priv fn in an impl does not create a private method. The following code compiles and runs without error, even though shl_unit() is marked priv: https://github.com/mozilla/rust/blob/e447521c1ca2dbead5b485ddc43060b282840817/src/libstd/bigint.rs#L452

extern mod std;
fn main() {
    std::bigint::BigUint::from_uint(2).shl_unit(3);
}

This issue might be related to issue #3452.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions