-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename one of sync::Mutex or sync::mutex::Mutex #15724
Comments
I think using the same name for both is fine as long as the paths leading up to it make it clear that one is a low-level mutex for |
@thestinger, |
I realize that, I'm saying that it would be fine if the paths were better. |
I was gonna suggest that |
This issue is no longer relevant after the |
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
vssync::mutex::Mutex
is just the example I hit today, but same-name-but-different items is a pattern we should avoid in general.The text was updated successfully, but these errors were encountered: