Skip to content

Conversation

cssivision
Copy link
Contributor

compare_and_swap is deprecated in 1.50. (rust-lang/rust#79261) This PR replaces the usage of compare_and_swap with compare_exchange.

migration docs: https://doc.rust-lang.org/nightly/core/sync/atomic/struct.AtomicUsize.html#migrating-to-compare_exchange-and-compare_exchange_weak

pub(crate) unsafe fn try_push(
&self,
block: &mut NonNull<Block<T>>,
ordering: Ordering,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

searching the codes, the usage of try_push always pass AcqRel i think we can simple remove the ordering parameter.

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I'm going to close this as a dup of #3331.

@taiki-e taiki-e closed this Dec 27, 2020
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.

2 participants