Rollup merge of #122104 - RalfJung:rust, r=ChrisDenton
Rust is a proper name: rust → Rust I only went over the library where it might be user-visible -- I noticed this in the `time` docs.
This commit is contained in:
commit
6b045184a8
@ -259,7 +259,7 @@ fn current_memory(&self) -> Option<(NonNull<u8>, Layout)> {
|
||||
} else {
|
||||
// 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
|
||||
// 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.
|
||||
const { assert!(mem::size_of::<T>() % mem::align_of::<T>() == 0) };
|
||||
unsafe {
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
/// 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.
|
||||
///
|
||||
/// [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
|
||||
#[stable(feature = "asm", since = "1.59.0")]
|
||||
#[rustc_builtin_macro]
|
||||
@ -19,10 +19,10 @@
|
||||
|
||||
/// 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.
|
||||
///
|
||||
/// [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
|
||||
#[stable(feature = "global_asm", since = "1.59.0")]
|
||||
#[rustc_builtin_macro]
|
||||
|
@ -1481,7 +1481,7 @@ macro_rules! cfg {
|
||||
/// 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
|
||||
/// 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
|
||||
/// `#[doc = include_str!("...")]` (at the item level) to include documentation from a plain
|
||||
/// text or markdown file.
|
||||
|
@ -3,7 +3,7 @@
|
||||
use crate::{cmp, fmt, hash, mem, num};
|
||||
|
||||
/// 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,
|
||||
/// are likely not to be supported by actual allocators and linkers.
|
||||
|
@ -23,7 +23,7 @@
|
||||
issue = "none",
|
||||
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;
|
||||
|
||||
#[unstable(
|
||||
|
@ -19,7 +19,7 @@
|
||||
///
|
||||
/// 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
|
||||
/// rust compiler that something is `Sync` in practice.
|
||||
/// Rust compiler that something is `Sync` in practice.
|
||||
///
|
||||
/// ## Examples
|
||||
/// Using a non-`Sync` future prevents the wrapping struct from being `Sync`
|
||||
|
@ -157,7 +157,7 @@ pub fn new() -> OsString {
|
||||
/// # Safety
|
||||
///
|
||||
/// 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
|
||||
/// over the network or stored in a file will likely violate these safety rules.
|
||||
///
|
||||
@ -213,7 +213,7 @@ pub fn as_os_str(&self) -> &OsStr {
|
||||
/// ASCII.
|
||||
///
|
||||
/// 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
|
||||
/// will likely result in incompatible data. See [`OsString`] for more encoding details
|
||||
/// and [`std::ffi`] for platform-specific, specified conversions.
|
||||
@ -747,7 +747,7 @@ pub fn new<S: AsRef<OsStr> + ?Sized>(s: &S) -> &OsStr {
|
||||
/// # Safety
|
||||
///
|
||||
/// 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
|
||||
/// over the network or stored in a file will likely violate these safety rules.
|
||||
///
|
||||
@ -955,7 +955,7 @@ pub fn into_os_string(self: Box<OsStr>) -> OsString {
|
||||
/// ASCII.
|
||||
///
|
||||
/// 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
|
||||
/// will likely result in incompatible byte slices. See [`OsString`] for more encoding details
|
||||
/// and [`std::ffi`] for platform-specific, specified conversions.
|
||||
|
@ -84,7 +84,7 @@
|
||||
//!
|
||||
//! # 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).
|
||||
//! The source for this documentation can be found on
|
||||
//! [GitHub](https://github.com/rust-lang/rust).
|
||||
|
@ -179,7 +179,7 @@ impl Sub<Instant> for Instant {
|
||||
///
|
||||
/// # 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.
|
||||
/// See [Monotonicity].
|
||||
///
|
||||
|
@ -59,7 +59,7 @@
|
||||
/// experience time dilation (slow down or speed up), but it will never go
|
||||
/// backwards.
|
||||
/// 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
|
||||
/// no method to get "the number of seconds" from an instant. Instead, it only
|
||||
@ -142,7 +142,7 @@
|
||||
/// 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
|
||||
/// 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
|
||||
/// [`duration_since`]: Instant::duration_since
|
||||
@ -290,7 +290,7 @@ pub fn now() -> Instant {
|
||||
///
|
||||
/// # 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.
|
||||
/// See [Monotonicity].
|
||||
///
|
||||
@ -365,7 +365,7 @@ pub fn saturating_duration_since(&self, earlier: Instant) -> Duration {
|
||||
///
|
||||
/// # 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.
|
||||
/// See [Monotonicity].
|
||||
///
|
||||
@ -450,7 +450,7 @@ impl Sub<Instant> for Instant {
|
||||
///
|
||||
/// # 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.
|
||||
/// See [Monotonicity].
|
||||
///
|
||||
|
@ -84,7 +84,7 @@ pub fn write_short_result(
|
||||
if self.test_column % QUIET_MODE_MAX_COLUMN == QUIET_MODE_MAX_COLUMN - 1 {
|
||||
// We insert a new line regularly in order to flush the
|
||||
// screen when dealing with line-buffered output (e.g., piping to
|
||||
// `stamp` in the rust CI).
|
||||
// `stamp` in the Rust CI).
|
||||
self.write_progress()?;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
pub use TestFn::*;
|
||||
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.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum TestType {
|
||||
|
Loading…
Reference in New Issue
Block a user