diff --git a/compiler/rustc_abi/Cargo.toml b/compiler/rustc_abi/Cargo.toml index 3acd25e546114..2b49c326bea65 100644 --- a/compiler/rustc_abi/Cargo.toml +++ b/compiler/rustc_abi/Cargo.toml @@ -20,7 +20,7 @@ tracing = "0.1" [features] # tidy-alphabetical-start default = ["nightly", "randomize"] -# rust-analyzer depends on this crate and we therefore require it to built on a stable toolchain +# rust-analyzer depends on this crate and we therefore require it to be built on a stable toolchain # without depending on rustc_data_structures, rustc_macros and rustc_serialize nightly = [ "dep:rustc_data_structures", diff --git a/compiler/rustc_abi/src/extern_abi/mod.rs b/compiler/rustc_abi/src/extern_abi/mod.rs index 130834d560f72..518496b285cc5 100644 --- a/compiler/rustc_abi/src/extern_abi/mod.rs +++ b/compiler/rustc_abi/src/extern_abi/mod.rs @@ -62,7 +62,7 @@ pub enum ExternAbi { /// normally ABI-compatible Rust types can become ABI-incompatible with this ABI! Unadjusted, /// For things unlikely to be called, where reducing register pressure in - /// `extern "Rust"` callers is worth paying extra cost in the callee. + /// `extern "Rust"` callers are worth paying an extra cost in the callee. /// Stronger than just `#[cold]` because `fn` pointers might be incompatible. RustCold, RiscvInterruptM, diff --git a/compiler/rustc_abi/src/layout.rs b/compiler/rustc_abi/src/layout.rs index b8773f9ff38f6..53a5a82d346fb 100644 --- a/compiler/rustc_abi/src/layout.rs +++ b/compiler/rustc_abi/src/layout.rs @@ -156,7 +156,7 @@ impl LayoutCalculator { // run and bias niches to the right and then check which one is closer to one of the // struct's edges. if let Ok(layout) = &layout { - // Don't try to calculate an end-biased layout for unsizable structs, + // Don't try to calculate an end-biased layout for unseizable structs, // otherwise we could end up with different layouts for // Foo and Foo which would break unsizing. if !matches!(kind, StructKind::MaybeUnsized) { diff --git a/compiler/rustc_abi/src/layout/ty.rs b/compiler/rustc_abi/src/layout/ty.rs index d188750bfe100..8797142e3e6d9 100644 --- a/compiler/rustc_abi/src/layout/ty.rs +++ b/compiler/rustc_abi/src/layout/ty.rs @@ -110,7 +110,7 @@ impl<'a> Layout<'a> { /// Whether the layout is from a type that implements [`std::marker::PointerLike`]. /// /// Currently, that means that the type is pointer-sized, pointer-aligned, - /// and has a initialized (non-union), scalar ABI. + /// and has an initialized (non-union), scalar ABI. pub fn is_pointer_like(self, data_layout: &TargetDataLayout) -> bool { self.size() == data_layout.pointer_size && self.align().abi == data_layout.pointer_align.abi @@ -119,7 +119,7 @@ impl<'a> Layout<'a> { } /// The layout of a type, alongside the type itself. -/// Provides various type traversal APIs (e.g., recursing into fields). +/// Provides various types of traversal APIs (e.g., recursing into fields). /// /// Note that the layout is NOT guaranteed to always be identical /// to that obtained from `layout_of(ty)`, as we need to produce diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index 8ad33749f3473..1403e008cce9d 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -19,7 +19,7 @@ at the machine level, with other code. This means it technically covers all of t - procedure calling conventions When we discuss "ABI" in the context of rustc, we are probably discussing calling conventions. -To describe those `rustc_abi` also covers type layout, as it must for values passed on the stack. +To describe those `rustc_abi` also covers type layout, as it must be for values passed on the stack. Despite `rustc_abi` being about calling conventions, it is good to remember these usages exist. You will encounter all of them and more if you study target-specific codegen enough! Even in general conversation, when someone says "the Rust ABI is unstable", it may allude to @@ -95,7 +95,7 @@ bitflags! { // Other flags can still inhibit reordering and thus randomization. // The seed stored in `ReprOptions.field_shuffle_seed`. const RANDOMIZE_LAYOUT = 1 << 4; - // Any of these flags being set prevent field reordering optimisation. + // Any of these flags being set to prevent field reordering optimisation. const FIELD_ORDER_UNOPTIMIZABLE = ReprFlags::IS_C.bits() | ReprFlags::IS_SIMD.bits() | ReprFlags::IS_LINEAR.bits();