Skip to content

Move the mutex module out of std::unstable and straight into libstd. #14011

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed

Conversation

thehydroimpulse
Copy link
Contributor

This is not a breaking change as mutex is re-exported in std::unstable
to make a transition easier. std::mutex is also marked as unstable.

This change is related to #1457 and comment
#1457 (comment)

@alexcrichton
Copy link
Member

This is a bit of a special case in that I'm wary about providing a std::mutex which sounds like it's "the mutex" for rust, when in fact it's the last thing you should resort to.

I think what with the std facade this will end up finding its own place, but for now it may want to continue to live in unstable while it still exists.

@pcwalton
Copy link
Contributor

pcwalton commented May 7, 2014

I think we should continue moving things out of unstable. If it needs a better name, that's fine, but there is no reason for stop energy on this patch.

@alexcrichton
Copy link
Member

If we must move it, let's please add it to std::os with a very very clear warning that you are not supposed to use it.

@adrientetar
Copy link
Contributor

Maybe something like std::internals could replace unstable?

@thehydroimpulse
Copy link
Contributor Author

Ahh, that's right. I forgot it's not the public mutex. std::internals definitely sounds like a more appropriate name for it.

@alexcrichton
Copy link
Member

Let's not start with std::internals because that's basically the same thing as std::unstable. Perhaps the best location is std::rt for now.

@thehydroimpulse
Copy link
Contributor Author

Ok, I'll move it to std::rt did you still want a re-export under std::unstable?

@alexcrichton
Copy link
Member

I think it's fine to move it out of std::unstable permanently. You'll need to reword the commit message for the breaking change, however.

@thehydroimpulse
Copy link
Contributor Author

@alexcrichton Moved it to rt and added a proper commit message.

@alexcrichton
Copy link
Member

Could you expand a bit on the rationale for why this module is moving? It's useful to put it directly in the commit message rather than indirectly through some links.

@thehydroimpulse
Copy link
Contributor Author

@alexcrichton Done.

@alexcrichton
Copy link
Member

(needs a rebase)

Could you also put a newline before "This is to cleanout..."

@thehydroimpulse
Copy link
Contributor Author

@alexcrichton Done.

@thehydroimpulse
Copy link
Contributor Author

Oops, didn't see that this failed. I'll get this fixed.

@thehydroimpulse
Copy link
Contributor Author

@alexcrichton Fixed the failing build. Tests pass on my end.

@huonw
Copy link
Member

huonw commented May 15, 2014

Needs another rebase.

@thehydroimpulse
Copy link
Contributor Author

@huonw Sorry, didn't get a notification on this PR. Rebased.

This is to cleanout the std::unstable module and use the appropriate
unstable attribute. This mutex module is **not** supposed to be
used outside of the compiler/std.

This change is according to rust-lang#1457 and comment
rust-lang#1457 (comment)

[breaking-change]
@@ -1 +1 @@
Subproject commit 0a894645cf120539876e9eb4eb0d7b572dfa9d14
Subproject commit 4b4d0533b4f76cc3fbba31bd9e7ac02e0c738b1d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably unintentional

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2023
…ievink

fix(ide-assists): unwrap block when it parent is let stmt

fix rust-lang#13990
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 6, 2025
Counting in bytes for a pointer to `u8` is legitimate and must not
trigger the lint. Also, this prevents linting the
`{std,core}::ptr::write_bytes` as it manipulates bytes.

Fix rust-lang#6590

changelog: [`size_of_in_element_count`]: do not lint if the pointee type
is `u8`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants