-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Implement AtomicT::update
& AtomicT::try_update
#133829
Conversation
r? @Noratrieb rustbot has assigned @Noratrieb. Use |
During the ACP discussions today, nobody loved the name My thoughts went toward finding a verb-form antonym for the word "try". In discussion with @joshtriplett after the meeting, he insightfully observed that the verb form antonym of "try" is "do or do not" (h/t Yoda). In all seriousness, though, the antonym of "try" is actually "do". To "do something" implies exclusion of simply "trying" to do it. So, especially as we wish that pub fn do_fetch_update<F>(
&self,
set_order: Ordering,
fetch_order: Ordering,
mut f: F,
) -> u64
where
F: FnMut(u64) -> u64; When we write that standard library naming convention guide that we talked about in the meeting today, then, we could say that we choose @rustbot labels +I-libs-api-nominated ...to consider the new naming proposal. cc @rust-lang/libs-api |
In the libs-api call today, (enough) people didn't like In terms of why Another name proposed, by David, was Then there was the proposal by Amanieu to deprecate |
We talked about this in today's @rust-lang/libs-api meeting. We didn't come to a firm conclusion yet, but we are considering the possibility of introducing new names for both functions, such as |
What would happen to the old occurrences of |
Since this was still marked as waiting-on-team, we would like to clarify the team's decision: we would like |
What is the process on this? I'm hesitant to move forward before clarification, so On an unrelated note, what happened to the generic |
Another naming option that I don't think anyone has brought up yet is I personally would prefer to avoid deprecating another1 atomic method, and retaining the Footnotes
|
Add it as unstable first, then stabilize, then later deprecate
That's basically just a synonym for
The only 2 options that we are current considering are either adding |
1dd8818
to
ab0c68e
Compare
AtomicT::update
& AtomicT::try_update
@rustbot label -S-waiting-on-team +S-waiting-on-review |
This comment has been minimized.
This comment has been minimized.
ab0c68e
to
541f7bd
Compare
This comment has been minimized.
This comment has been minimized.
541f7bd
to
c06ed54
Compare
@bors r+ |
…le, r=Noratrieb Implement `AtomicT::update` & `AtomicT::try_update` ACP accepted in rust-lang/libs-team#490 `@rustbot` label +T-libs-api
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#133151 (Trim extra whitespace in fn ptr suggestion span) - rust-lang#133829 (Implement `AtomicT::update` & `AtomicT::try_update`) - rust-lang#135367 (Enable `unreachable_pub` lint in `alloc`) - rust-lang#135748 (Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸) - rust-lang#135805 (Add missing allocator safety in alloc crate) - rust-lang#135886 (Document purpose of closure in from_fn.rs more clearly) - rust-lang#135961 (Fix 2/4 tests skipped by opt-dist) - rust-lang#136012 (Document powf and powi values that are always 1.0) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133829 - GrigorenkoPV:fetch_update_infallible, r=Noratrieb Implement `AtomicT::update` & `AtomicT::try_update` ACP accepted in rust-lang/libs-team#490 ``@rustbot`` label +T-libs-api
ACP accepted in rust-lang/libs-team#490
@rustbot label +T-libs-api