Skip to content

[bind_instead_of_map]: also lint on AtomicT::fetch_update / AtomicT::try_update#16811

Draft
GrigorenkoPV wants to merge 4 commits intorust-lang:masterfrom
GrigorenkoPV:fetch_update
Draft

[bind_instead_of_map]: also lint on AtomicT::fetch_update / AtomicT::try_update#16811
GrigorenkoPV wants to merge 4 commits intorust-lang:masterfrom
GrigorenkoPV:fetch_update

Conversation

@GrigorenkoPV
Copy link
Copy Markdown
Contributor

Closes #16055
Based on top of #16797

TODO:

  • Do not show Atmoic<T> in pretty pritning
  • Do not use unwrap()
  • Remove dbg!()
  • Probably don't suggest outright removal, because this might have some side-effects related to memory ordering?
  • There are some problems with the fact that fetch_update / try_update return Result<T, T>, but update returns T. Maybe make the suggestions not machine-applicable?
  • Make tests pass
  • Update docs

changelog: [bind_instead_of_map]: also lint on AtomicT::fetch_update / AtomicT::try_update

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 16, 2026

☔ The latest upstream changes (possibly #16867) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

try_update (or fetch_update) where update would work

2 participants