Skip to content

Adding new public items is not a breaking change? #2723

Open
@tesuji

Description

@tesuji

This section adding new public items states that

adding new public items is currently a breaking change, due to glob imports

But look at this example (playground):

mod baz{
    use foo::*;
    mod foo {
        pub fn bar() {
            println!("bar");
        }
    }

    pub fn bar() {
        println!("foo");
    }
}

use baz::bar;

fn main() {
    bar()
}

It compiles fine with the output:

foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveProposals relating to name resolution.A-stabilityProposals relating to policy and changes about stability of features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions