rust-lang / rust-lang/rfcs

Adding new public items is not a breaking change?

Open
#2,723 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-resolve A-stability
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the “adding new public items” section of RFC 1105 and reproduce the linked Rust Playground example on stable Rust. Determine whether the example contradicts the RFC’s statement, then clarify the documented rule or its example and verify the revised explanation against the same case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.