Skip to content

Rename one of sync::Mutex or sync::mutex::Mutex #15724

Closed
@SimonSapin

Description

@SimonSapin

They currently have very different semantics: the former is a lock-protected container while the latter is only a lock. I just spent a few minutes very confused, looking at the docs for one of them to understand code using the other.

Combined with #15723 and libstd-as-a-facade (many items with the same name documented in different modules are in fact the same item), this really brings down the doc’s usability.

sync::Mutex vs sync::mutex::Mutex is just the example I hit today, but same-name-but-different items is a pattern we should avoid in general.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions