Skip to content
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

Move to intra-doc links for /library/core/src/intrinsics.rs #75705

Merged
merged 17 commits into from
Aug 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,23 +280,23 @@ extern "rust-intrinsic" {
/// `std::sync::atomic` types via the `load` method by passing
/// [`Ordering::SeqCst`](crate::sync::atomic::Ordering::SeqCst)
/// as the `order`. For example,
/// [`AtomicBool::load`](../../std/sync/atomic/struct.AtomicBool.html#method.load).
/// [`AtomicBool::load`](crate::sync::atomic::AtomicBool::load).
Copy link
Member

Choose a reason for hiding this comment

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

Same comment about use crate::sync::atomic::AtomicBool;.

pub fn atomic_load<T: Copy>(src: *const T) -> T;
/// Loads the current value of the pointer.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `load` method by passing
/// [`Ordering::Acquire`](crate::sync::atomic::Ordering::Acquire)
/// as the `order`. For example,
/// [`AtomicBool::load`](../../std/sync/atomic/struct.AtomicBool.html#method.load).
/// [`AtomicBool::load`](crate::sync::atomic::AtomicBool::load).
pub fn atomic_load_acq<T: Copy>(src: *const T) -> T;
/// Loads the current value of the pointer.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `load` method by passing
/// [`Ordering::Relaxed`](crate::sync::atomic::Ordering::Relaxed)
/// as the `order`. For example,
/// [`AtomicBool::load`](../../std/sync/atomic/struct.AtomicBool.html#method.load).
/// [`AtomicBool::load`](crate::sync::atomic::AtomicBool::load).
pub fn atomic_load_relaxed<T: Copy>(src: *const T) -> T;
pub fn atomic_load_unordered<T: Copy>(src: *const T) -> T;

Expand All @@ -306,23 +306,23 @@ extern "rust-intrinsic" {
/// `std::sync::atomic` types via the `store` method by passing
/// [`Ordering::SeqCst`](crate::sync::atomic::Ordering::SeqCst)
/// as the `order`. For example,
/// [`AtomicBool::store`](../../std/sync/atomic/struct.AtomicBool.html#method.store).
/// [`AtomicBool::store`](crate::sync::atomic::AtomicBool::store).
pub fn atomic_store<T: Copy>(dst: *mut T, val: T);
/// Stores the value at the specified memory location.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `store` method by passing
/// [`Ordering::Release`](crate::sync::atomic::Ordering::Release)
/// as the `order`. For example,
/// [`AtomicBool::store`](../../std/sync/atomic/struct.AtomicBool.html#method.store).
/// [`AtomicBool::store`](crate::sync::atomic::AtomicBool::store).
pub fn atomic_store_rel<T: Copy>(dst: *mut T, val: T);
/// Stores the value at the specified memory location.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `store` method by passing
/// [`Ordering::Relaxed`](crate::sync::atomic::Ordering::Relaxed)
/// as the `order`. For example,
/// [`AtomicBool::store`](../../std/sync/atomic/struct.AtomicBool.html#method.store).
/// [`AtomicBool::store`](crate::sync::atomic::AtomicBool::store).
pub fn atomic_store_relaxed<T: Copy>(dst: *mut T, val: T);
pub fn atomic_store_unordered<T: Copy>(dst: *mut T, val: T);

Expand All @@ -332,39 +332,39 @@ extern "rust-intrinsic" {
/// `std::sync::atomic` types via the `swap` method by passing
/// [`Ordering::SeqCst`](crate::sync::atomic::Ordering::SeqCst)
/// as the `order`. For example,
/// [`AtomicBool::swap`](../../std/sync/atomic/struct.AtomicBool.html#method.swap).
/// [`AtomicBool::swap`](crate::sync::atomic::AtomicBool::swap).
pub fn atomic_xchg<T: Copy>(dst: *mut T, src: T) -> T;
/// Stores the value at the specified memory location, returning the old value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `swap` method by passing
/// [`Ordering::Acquire`](crate::sync::atomic::Ordering::Acquire)
/// as the `order`. For example,
/// [`AtomicBool::swap`](../../std/sync/atomic/struct.AtomicBool.html#method.swap).
/// [`AtomicBool::swap`](crate::sync::atomic::AtomicBool::swap).
pub fn atomic_xchg_acq<T: Copy>(dst: *mut T, src: T) -> T;
/// Stores the value at the specified memory location, returning the old value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `swap` method by passing
/// [`Ordering::Release`](crate::sync::atomic::Ordering::Release)
/// as the `order`. For example,
/// [`AtomicBool::swap`](../../std/sync/atomic/struct.AtomicBool.html#method.swap).
/// [`AtomicBool::swap`](crate::sync::atomic::AtomicBool::swap).
pub fn atomic_xchg_rel<T: Copy>(dst: *mut T, src: T) -> T;
/// Stores the value at the specified memory location, returning the old value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `swap` method by passing
/// [`Ordering::AcqRel`](crate::sync::atomic::Ordering::AcqRel)
/// as the `order`. For example,
/// [`AtomicBool::swap`](../../std/sync/atomic/struct.AtomicBool.html#method.swap).
/// [`AtomicBool::swap`](crate::sync::atomic::AtomicBool::swap).
pub fn atomic_xchg_acqrel<T: Copy>(dst: *mut T, src: T) -> T;
/// Stores the value at the specified memory location, returning the old value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `swap` method by passing
/// [`Ordering::Relaxed`](crate::sync::atomic::Ordering::Relaxed)
/// as the `order`. For example,
/// [`AtomicBool::swap`](../../std/sync/atomic/struct.AtomicBool.html#method.swap).
/// [`AtomicBool::swap`](crate::sync::atomic::AtomicBool::swap).
pub fn atomic_xchg_relaxed<T: Copy>(dst: *mut T, src: T) -> T;

/// Adds to the current value, returning the previous value.
Expand Down Expand Up @@ -455,39 +455,39 @@ extern "rust-intrinsic" {
/// `std::sync::atomic` types via the `fetch_and` method by passing
/// [`Ordering::SeqCst`](crate::sync::atomic::Ordering::SeqCst)
/// as the `order`. For example,
/// [`AtomicBool::fetch_and`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_and).
/// [`AtomicBool::fetch_and`](crate::sync::atomic::AtomicBool::fetch_and).
pub fn atomic_and<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise and with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_and` method by passing
/// [`Ordering::Acquire`](crate::sync::atomic::Ordering::Acquire)
/// as the `order`. For example,
/// [`AtomicBool::fetch_and`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_and).
/// [`AtomicBool::fetch_and`](crate::sync::atomic::AtomicBool::fetch_and).
pub fn atomic_and_acq<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise and with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_and` method by passing
/// [`Ordering::Release`](crate::sync::atomic::Ordering::Release)
/// as the `order`. For example,
/// [`AtomicBool::fetch_and`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_and).
/// [`AtomicBool::fetch_and`](crate::sync::atomic::AtomicBool::fetch_and).
pub fn atomic_and_rel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise and with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_and` method by passing
/// [`Ordering::AcqRel`](crate::sync::atomic::Ordering::AcqRel)
/// as the `order`. For example,
/// [`AtomicBool::fetch_and`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_and).
/// [`AtomicBool::fetch_and`](crate::sync::atomic::AtomicBool::fetch_and).
pub fn atomic_and_acqrel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise and with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_and` method by passing
/// [`Ordering::Relaxed`](crate::sync::atomic::Ordering::Relaxed)
/// as the `order`. For example,
/// [`AtomicBool::fetch_and`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_and).
/// [`AtomicBool::fetch_and`](crate::sync::atomic::AtomicBool::fetch_and).
pub fn atomic_and_relaxed<T: Copy>(dst: *mut T, src: T) -> T;

/// Bitwise nand with the current value, returning the previous value.
Expand All @@ -496,39 +496,39 @@ extern "rust-intrinsic" {
/// `std::sync::atomic::AtomicBool` type via the `fetch_nand` method by passing
/// [`Ordering::SeqCst`](crate::sync::atomic::Ordering::SeqCst)
/// as the `order`. For example,
/// [`AtomicBool::fetch_nand`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_nand).
/// [`AtomicBool::fetch_nand`](crate::sync::atomic::AtomicBool::fetch_nand).
pub fn atomic_nand<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise nand with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic::AtomicBool` type via the `fetch_nand` method by passing
/// [`Ordering::Acquire`](crate::sync::atomic::Ordering::Acquire)
/// as the `order`. For example,
/// [`AtomicBool::fetch_nand`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_nand).
/// [`AtomicBool::fetch_nand`](crate::sync::atomic::AtomicBool::fetch_nand).
pub fn atomic_nand_acq<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise nand with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic::AtomicBool` type via the `fetch_nand` method by passing
/// [`Ordering::Release`](crate::sync::atomic::Ordering::Release)
/// as the `order`. For example,
/// [`AtomicBool::fetch_nand`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_nand).
/// [`AtomicBool::fetch_nand`](crate::sync::atomic::AtomicBool::fetch_nand).
pub fn atomic_nand_rel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise nand with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic::AtomicBool` type via the `fetch_nand` method by passing
/// [`Ordering::AcqRel`](crate::sync::atomic::Ordering::AcqRel)
/// as the `order`. For example,
/// [`AtomicBool::fetch_nand`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_nand).
/// [`AtomicBool::fetch_nand`](crate::sync::atomic::AtomicBool::fetch_nand).
pub fn atomic_nand_acqrel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise nand with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic::AtomicBool` type via the `fetch_nand` method by passing
/// [`Ordering::Relaxed`](crate::sync::atomic::Ordering::Relaxed)
/// as the `order`. For example,
/// [`AtomicBool::fetch_nand`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_nand).
/// [`AtomicBool::fetch_nand`](crate::sync::atomic::AtomicBool::fetch_nand).
pub fn atomic_nand_relaxed<T: Copy>(dst: *mut T, src: T) -> T;

/// Bitwise or with the current value, returning the previous value.
Expand All @@ -537,39 +537,39 @@ extern "rust-intrinsic" {
/// `std::sync::atomic` types via the `fetch_or` method by passing
/// [`Ordering::SeqCst`](crate::sync::atomic::Ordering::SeqCst)
/// as the `order`. For example,
/// [`AtomicBool::fetch_or`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_or).
/// [`AtomicBool::fetch_or`](crate::sync::atomic::AtomicBool::fetch_or).
pub fn atomic_or<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise or with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_or` method by passing
/// [`Ordering::Acquire`](crate::sync::atomic::Ordering::Acquire)
/// as the `order`. For example,
/// [`AtomicBool::fetch_or`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_or).
/// [`AtomicBool::fetch_or`](crate::sync::atomic::AtomicBool::fetch_or).
pub fn atomic_or_acq<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise or with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_or` method by passing
/// [`Ordering::Release`](crate::sync::atomic::Ordering::Release)
/// as the `order`. For example,
/// [`AtomicBool::fetch_or`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_or).
/// [`AtomicBool::fetch_or`](crate::sync::atomic::AtomicBool::fetch_or).
pub fn atomic_or_rel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise or with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_or` method by passing
/// [`Ordering::AcqRel`](crate::sync::atomic::Ordering::AcqRel)
/// as the `order`. For example,
/// [`AtomicBool::fetch_or`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_or).
/// [`AtomicBool::fetch_or`](crate::sync::atomic::AtomicBool::fetch_or).
pub fn atomic_or_acqrel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise or with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_or` method by passing
/// [`Ordering::Relaxed`](crate::sync::atomic::Ordering::Relaxed)
/// as the `order`. For example,
/// [`AtomicBool::fetch_or`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_or).
/// [`AtomicBool::fetch_or`](crate::sync::atomic::AtomicBool::fetch_or).
pub fn atomic_or_relaxed<T: Copy>(dst: *mut T, src: T) -> T;

/// Bitwise xor with the current value, returning the previous value.
Expand All @@ -578,39 +578,39 @@ extern "rust-intrinsic" {
/// `std::sync::atomic` types via the `fetch_xor` method by passing
/// [`Ordering::SeqCst`](crate::sync::atomic::Ordering::SeqCst)
/// as the `order`. For example,
/// [`AtomicBool::fetch_xor`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_xor).
/// [`AtomicBool::fetch_xor`](crate::sync::atomic::AtomicBool::fetch_xor).
pub fn atomic_xor<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise xor with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_xor` method by passing
/// [`Ordering::Acquire`](crate::sync::atomic::Ordering::Acquire)
/// as the `order`. For example,
/// [`AtomicBool::fetch_xor`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_xor).
/// [`AtomicBool::fetch_xor`](crate::sync::atomic::AtomicBool::fetch_xor).
pub fn atomic_xor_acq<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise xor with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_xor` method by passing
/// [`Ordering::Release`](crate::sync::atomic::Ordering::Release)
/// as the `order`. For example,
/// [`AtomicBool::fetch_xor`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_xor).
/// [`AtomicBool::fetch_xor`](crate::sync::atomic::AtomicBool::fetch_xor).
pub fn atomic_xor_rel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise xor with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_xor` method by passing
/// [`Ordering::AcqRel`](crate::sync::atomic::Ordering::AcqRel)
/// as the `order`. For example,
/// [`AtomicBool::fetch_xor`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_xor).
/// [`AtomicBool::fetch_xor`](crate::sync::atomic::AtomicBool::fetch_xor).
pub fn atomic_xor_acqrel<T: Copy>(dst: *mut T, src: T) -> T;
/// Bitwise xor with the current value, returning the previous value.
///
/// The stabilized version of this intrinsic is available on the
/// `std::sync::atomic` types via the `fetch_xor` method by passing
/// [`Ordering::Relaxed`](crate::sync::atomic::Ordering::Relaxed)
/// as the `order`. For example,
/// [`AtomicBool::fetch_xor`](../../std/sync/atomic/struct.AtomicBool.html#method.fetch_xor).
/// [`AtomicBool::fetch_xor`](crate::sync::atomic::AtomicBool::fetch_xor).
pub fn atomic_xor_relaxed<T: Copy>(dst: *mut T, src: T) -> T;

/// Maximum with the current value using a signed comparison.
Expand Down