Move mutex_integer to restriction and improve mutex_{integer,atomic} docs#14110
Merged
Jarcho merged 1 commit intorust-lang:masterfrom Feb 4, 2025
Merged
Move mutex_integer to restriction and improve mutex_{integer,atomic} docs#14110Jarcho merged 1 commit intorust-lang:masterfrom
Jarcho merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
| UintTy::U64 => Some("AtomicU64"), | ||
| UintTy::Usize => Some("AtomicUsize"), | ||
| // There's no `AtomicU128`. | ||
| // `AtomicU128` is unstable and only available on a few platforms: https://github.com/rust-lang/rust/issues/99069 |
Member
There was a problem hiding this comment.
Maybe this lint could be configurable:
- You may want to specify a maximum size of integer that would trigger the lint (for example 32 bits) if you want your code to be portable across various architectures you use, with a reasonable default (32 or 64).
- You may want to check if the projected target type exist on the current target at least, by looking up the corresponding diagnostic item. Note that
AtomicI128andAtomicU128are also diagnostic items, but you may also want to check for the "integer_atomics" feature before you are going to suggest them.
smoelius
reviewed
Jan 30, 2025
256695a to
f8be518
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to #10115 (for
mutex_atomic), but formutex_integer.This also improve docs of
mutex_integer/mutex_atomic(extend known problems section to mention condvar issue (#1516) and portability issue).changelog: Moved [
mutex_integer] torestriction