Rust is a proper name: rust → Rust
This commit is contained in:
parent
aa029ce4d8
commit
1a2bc1102d
@ -259,7 +259,7 @@ impl<T, A: Allocator> RawVec<T, A> {
|
|||||||
} else {
|
} else {
|
||||||
// We could use Layout::array here which ensures the absence of isize and usize overflows
|
// We could use Layout::array here which ensures the absence of isize and usize overflows
|
||||||
// and could hypothetically handle differences between stride and size, but this memory
|
// and could hypothetically handle differences between stride and size, but this memory
|
||||||
// has already been allocated so we know it can't overflow and currently rust does not
|
// has already been allocated so we know it can't overflow and currently Rust does not
|
||||||
// support such types. So we can do better by skipping some checks and avoid an unwrap.
|
// support such types. So we can do better by skipping some checks and avoid an unwrap.
|
||||||
const { assert!(mem::size_of::<T>() % mem::align_of::<T>() == 0) };
|
const { assert!(mem::size_of::<T>() % mem::align_of::<T>() == 0) };
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -6,10 +6,10 @@ pub use crate::core_arch::arch::*;
|
|||||||
|
|
||||||
/// Inline assembly.
|
/// Inline assembly.
|
||||||
///
|
///
|
||||||
/// Refer to [rust by example] for a usage guide and the [reference] for
|
/// Refer to [Rust By Example] for a usage guide and the [reference] for
|
||||||
/// detailed information about the syntax and available options.
|
/// detailed information about the syntax and available options.
|
||||||
///
|
///
|
||||||
/// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
|
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
|
||||||
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
|
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
|
||||||
#[stable(feature = "asm", since = "1.59.0")]
|
#[stable(feature = "asm", since = "1.59.0")]
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
@ -19,10 +19,10 @@ pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
|
|||||||
|
|
||||||
/// Module-level inline assembly.
|
/// Module-level inline assembly.
|
||||||
///
|
///
|
||||||
/// Refer to [rust by example] for a usage guide and the [reference] for
|
/// Refer to [Rust By Example] for a usage guide and the [reference] for
|
||||||
/// detailed information about the syntax and available options.
|
/// detailed information about the syntax and available options.
|
||||||
///
|
///
|
||||||
/// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
|
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
|
||||||
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
|
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
|
||||||
#[stable(feature = "global_asm", since = "1.59.0")]
|
#[stable(feature = "global_asm", since = "1.59.0")]
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
|
@ -1481,7 +1481,7 @@ pub(crate) mod builtin {
|
|||||||
/// script](https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script).
|
/// script](https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script).
|
||||||
///
|
///
|
||||||
/// When using the `include` macro to include stretches of documentation, remember that the
|
/// When using the `include` macro to include stretches of documentation, remember that the
|
||||||
/// included file still needs to be a valid rust syntax. It is also possible to
|
/// included file still needs to be a valid Rust syntax. It is also possible to
|
||||||
/// use the [`include_str`] macro as `#![doc = include_str!("...")]` (at the module level) or
|
/// use the [`include_str`] macro as `#![doc = include_str!("...")]` (at the module level) or
|
||||||
/// `#[doc = include_str!("...")]` (at the item level) to include documentation from a plain
|
/// `#[doc = include_str!("...")]` (at the item level) to include documentation from a plain
|
||||||
/// text or markdown file.
|
/// text or markdown file.
|
||||||
|
@ -3,7 +3,7 @@ use crate::num::NonZero;
|
|||||||
use crate::{cmp, fmt, hash, mem, num};
|
use crate::{cmp, fmt, hash, mem, num};
|
||||||
|
|
||||||
/// A type storing a `usize` which is a power of two, and thus
|
/// A type storing a `usize` which is a power of two, and thus
|
||||||
/// represents a possible alignment in the rust abstract machine.
|
/// represents a possible alignment in the Rust abstract machine.
|
||||||
///
|
///
|
||||||
/// Note that particularly large alignments, while representable in this type,
|
/// Note that particularly large alignments, while representable in this type,
|
||||||
/// are likely not to be supported by actual allocators and linkers.
|
/// are likely not to be supported by actual allocators and linkers.
|
||||||
|
@ -23,7 +23,7 @@ use crate::slice;
|
|||||||
issue = "none",
|
issue = "none",
|
||||||
reason = "exposed from core to be reused in std; use the memchr crate"
|
reason = "exposed from core to be reused in std; use the memchr crate"
|
||||||
)]
|
)]
|
||||||
/// Pure rust memchr implementation, taken from rust-memchr
|
/// Pure Rust memchr implementation, taken from rust-memchr
|
||||||
pub mod memchr;
|
pub mod memchr;
|
||||||
|
|
||||||
#[unstable(
|
#[unstable(
|
||||||
|
@ -19,7 +19,7 @@ use core::task::{Context, Poll};
|
|||||||
///
|
///
|
||||||
/// Certain constructs like [`Future`]s can only be used with _exclusive_ access,
|
/// Certain constructs like [`Future`]s can only be used with _exclusive_ access,
|
||||||
/// and are often `Send` but not `Sync`, so `Exclusive` can be used as hint to the
|
/// and are often `Send` but not `Sync`, so `Exclusive` can be used as hint to the
|
||||||
/// rust compiler that something is `Sync` in practice.
|
/// Rust compiler that something is `Sync` in practice.
|
||||||
///
|
///
|
||||||
/// ## Examples
|
/// ## Examples
|
||||||
/// Using a non-`Sync` future prevents the wrapping struct from being `Sync`
|
/// Using a non-`Sync` future prevents the wrapping struct from being `Sync`
|
||||||
|
@ -157,7 +157,7 @@ impl OsString {
|
|||||||
/// # Safety
|
/// # Safety
|
||||||
///
|
///
|
||||||
/// As the encoding is unspecified, callers must pass in bytes that originated as a mixture of
|
/// As the encoding is unspecified, callers must pass in bytes that originated as a mixture of
|
||||||
/// validated UTF-8 and bytes from [`OsStr::as_encoded_bytes`] from within the same rust version
|
/// validated UTF-8 and bytes from [`OsStr::as_encoded_bytes`] from within the same Rust version
|
||||||
/// built for the same target platform. For example, reconstructing an `OsString` from bytes sent
|
/// built for the same target platform. For example, reconstructing an `OsString` from bytes sent
|
||||||
/// over the network or stored in a file will likely violate these safety rules.
|
/// over the network or stored in a file will likely violate these safety rules.
|
||||||
///
|
///
|
||||||
@ -213,7 +213,7 @@ impl OsString {
|
|||||||
/// ASCII.
|
/// ASCII.
|
||||||
///
|
///
|
||||||
/// Note: As the encoding is unspecified, any sub-slice of bytes that is not valid UTF-8 should
|
/// Note: As the encoding is unspecified, any sub-slice of bytes that is not valid UTF-8 should
|
||||||
/// be treated as opaque and only comparable within the same rust version built for the same
|
/// be treated as opaque and only comparable within the same Rust version built for the same
|
||||||
/// target platform. For example, sending the bytes over the network or storing it in a file
|
/// target platform. For example, sending the bytes over the network or storing it in a file
|
||||||
/// will likely result in incompatible data. See [`OsString`] for more encoding details
|
/// will likely result in incompatible data. See [`OsString`] for more encoding details
|
||||||
/// and [`std::ffi`] for platform-specific, specified conversions.
|
/// and [`std::ffi`] for platform-specific, specified conversions.
|
||||||
@ -747,7 +747,7 @@ impl OsStr {
|
|||||||
/// # Safety
|
/// # Safety
|
||||||
///
|
///
|
||||||
/// As the encoding is unspecified, callers must pass in bytes that originated as a mixture of
|
/// As the encoding is unspecified, callers must pass in bytes that originated as a mixture of
|
||||||
/// validated UTF-8 and bytes from [`OsStr::as_encoded_bytes`] from within the same rust version
|
/// validated UTF-8 and bytes from [`OsStr::as_encoded_bytes`] from within the same Rust version
|
||||||
/// built for the same target platform. For example, reconstructing an `OsStr` from bytes sent
|
/// built for the same target platform. For example, reconstructing an `OsStr` from bytes sent
|
||||||
/// over the network or stored in a file will likely violate these safety rules.
|
/// over the network or stored in a file will likely violate these safety rules.
|
||||||
///
|
///
|
||||||
@ -955,7 +955,7 @@ impl OsStr {
|
|||||||
/// ASCII.
|
/// ASCII.
|
||||||
///
|
///
|
||||||
/// Note: As the encoding is unspecified, any sub-slice of bytes that is not valid UTF-8 should
|
/// Note: As the encoding is unspecified, any sub-slice of bytes that is not valid UTF-8 should
|
||||||
/// be treated as opaque and only comparable within the same rust version built for the same
|
/// be treated as opaque and only comparable within the same Rust version built for the same
|
||||||
/// target platform. For example, sending the slice over the network or storing it in a file
|
/// target platform. For example, sending the slice over the network or storing it in a file
|
||||||
/// will likely result in incompatible byte slices. See [`OsString`] for more encoding details
|
/// will likely result in incompatible byte slices. See [`OsString`] for more encoding details
|
||||||
/// and [`std::ffi`] for platform-specific, specified conversions.
|
/// and [`std::ffi`] for platform-specific, specified conversions.
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
//!
|
//!
|
||||||
//! # Contributing changes to the documentation
|
//! # Contributing changes to the documentation
|
||||||
//!
|
//!
|
||||||
//! Check out the rust contribution guidelines [here](
|
//! Check out the Rust contribution guidelines [here](
|
||||||
//! https://rustc-dev-guide.rust-lang.org/contributing.html#writing-documentation).
|
//! https://rustc-dev-guide.rust-lang.org/contributing.html#writing-documentation).
|
||||||
//! The source for this documentation can be found on
|
//! The source for this documentation can be found on
|
||||||
//! [GitHub](https://github.com/rust-lang/rust).
|
//! [GitHub](https://github.com/rust-lang/rust).
|
||||||
|
@ -179,7 +179,7 @@ impl Sub<Instant> for Instant {
|
|||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// Previous rust versions panicked when `other` was later than `self`. Currently this
|
/// Previous Rust versions panicked when `other` was later than `self`. Currently this
|
||||||
/// method saturates. Future versions may reintroduce the panic in some circumstances.
|
/// method saturates. Future versions may reintroduce the panic in some circumstances.
|
||||||
/// See [Monotonicity].
|
/// See [Monotonicity].
|
||||||
///
|
///
|
||||||
|
@ -59,7 +59,7 @@ pub use core::time::TryFromFloatSecsError;
|
|||||||
/// experience time dilation (slow down or speed up), but it will never go
|
/// experience time dilation (slow down or speed up), but it will never go
|
||||||
/// backwards.
|
/// backwards.
|
||||||
/// As part of this non-guarantee it is also not specified whether system suspends count as
|
/// As part of this non-guarantee it is also not specified whether system suspends count as
|
||||||
/// elapsed time or not. The behavior varies across platforms and rust versions.
|
/// elapsed time or not. The behavior varies across platforms and Rust versions.
|
||||||
///
|
///
|
||||||
/// Instants are opaque types that can only be compared to one another. There is
|
/// Instants are opaque types that can only be compared to one another. There is
|
||||||
/// no method to get "the number of seconds" from an instant. Instead, it only
|
/// no method to get "the number of seconds" from an instant. Instead, it only
|
||||||
@ -142,7 +142,7 @@ pub use core::time::TryFromFloatSecsError;
|
|||||||
/// where monotonicity is violated, or `Instant`s are subtracted in the wrong order.
|
/// where monotonicity is violated, or `Instant`s are subtracted in the wrong order.
|
||||||
///
|
///
|
||||||
/// This workaround obscures programming errors where earlier and later instants are accidentally
|
/// This workaround obscures programming errors where earlier and later instants are accidentally
|
||||||
/// swapped. For this reason future rust versions may reintroduce panics.
|
/// swapped. For this reason future Rust versions may reintroduce panics.
|
||||||
///
|
///
|
||||||
/// [tier 1]: https://doc.rust-lang.org/rustc/platform-support.html
|
/// [tier 1]: https://doc.rust-lang.org/rustc/platform-support.html
|
||||||
/// [`duration_since`]: Instant::duration_since
|
/// [`duration_since`]: Instant::duration_since
|
||||||
@ -290,7 +290,7 @@ impl Instant {
|
|||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// Previous rust versions panicked when `earlier` was later than `self`. Currently this
|
/// Previous Rust versions panicked when `earlier` was later than `self`. Currently this
|
||||||
/// method saturates. Future versions may reintroduce the panic in some circumstances.
|
/// method saturates. Future versions may reintroduce the panic in some circumstances.
|
||||||
/// See [Monotonicity].
|
/// See [Monotonicity].
|
||||||
///
|
///
|
||||||
@ -365,7 +365,7 @@ impl Instant {
|
|||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// Previous rust versions panicked when the current time was earlier than self. Currently this
|
/// Previous Rust versions panicked when the current time was earlier than self. Currently this
|
||||||
/// method returns a Duration of zero in that case. Future versions may reintroduce the panic.
|
/// method returns a Duration of zero in that case. Future versions may reintroduce the panic.
|
||||||
/// See [Monotonicity].
|
/// See [Monotonicity].
|
||||||
///
|
///
|
||||||
@ -450,7 +450,7 @@ impl Sub<Instant> for Instant {
|
|||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// Previous rust versions panicked when `other` was later than `self`. Currently this
|
/// Previous Rust versions panicked when `other` was later than `self`. Currently this
|
||||||
/// method saturates. Future versions may reintroduce the panic in some circumstances.
|
/// method saturates. Future versions may reintroduce the panic in some circumstances.
|
||||||
/// See [Monotonicity].
|
/// See [Monotonicity].
|
||||||
///
|
///
|
||||||
|
@ -84,7 +84,7 @@ impl<T: Write> TerseFormatter<T> {
|
|||||||
if self.test_column % QUIET_MODE_MAX_COLUMN == QUIET_MODE_MAX_COLUMN - 1 {
|
if self.test_column % QUIET_MODE_MAX_COLUMN == QUIET_MODE_MAX_COLUMN - 1 {
|
||||||
// We insert a new line regularly in order to flush the
|
// We insert a new line regularly in order to flush the
|
||||||
// screen when dealing with line-buffered output (e.g., piping to
|
// screen when dealing with line-buffered output (e.g., piping to
|
||||||
// `stamp` in the rust CI).
|
// `stamp` in the Rust CI).
|
||||||
self.write_progress()?;
|
self.write_progress()?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ pub use NamePadding::*;
|
|||||||
pub use TestFn::*;
|
pub use TestFn::*;
|
||||||
pub use TestName::*;
|
pub use TestName::*;
|
||||||
|
|
||||||
/// Type of the test according to the [rust book](https://doc.rust-lang.org/cargo/guide/tests.html)
|
/// Type of the test according to the [Rust book](https://doc.rust-lang.org/cargo/guide/tests.html)
|
||||||
/// conventions.
|
/// conventions.
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||||
pub enum TestType {
|
pub enum TestType {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user