Skip to content

Commit 8b1141a

Browse files
authored
Rollup merge of #132060 - joshtriplett:innermost-outermost, r=jieyouxu
"innermost", "outermost", "leftmost", and "rightmost" don't need hyphens These are all standard dictionary words and don't require hyphenation. ----- Encountered an instance of this in error messages and it bugged me, so I figured I'd fix it across the entire codebase.
2 parents 28aacb3 + ecdc244 commit 8b1141a

File tree

19 files changed

+45
-45
lines changed

19 files changed

+45
-45
lines changed

compiler/rustc_codegen_gcc/src/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
197197
/// `[T]` becomes `T`, while `str` and `Trait` turn into `i8` - this
198198
/// is useful for indexing slices, as `&[T]`'s data pointer is `T*`.
199199
/// If the type is an unsized struct, the regular layout is generated,
200-
/// with the inner-most trailing unsized field using the "minimal unit"
200+
/// with the innermost trailing unsized field using the "minimal unit"
201201
/// of that field's type - this is useful for taking the address of
202202
/// that field and ensuring the struct has the right alignment.
203203
fn gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Type<'gcc> {

compiler/rustc_codegen_llvm/src/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyAndLayout<'tcx> {
191191
/// `[T]` becomes `T`, while `str` and `Trait` turn into `i8` - this
192192
/// is useful for indexing slices, as `&[T]`'s data pointer is `T*`.
193193
/// If the type is an unsized struct, the regular layout is generated,
194-
/// with the inner-most trailing unsized field using the "minimal unit"
194+
/// with the innermost trailing unsized field using the "minimal unit"
195195
/// of that field's type - this is useful for taking the address of
196196
/// that field and ensuring the struct has the right alignment.
197197
fn llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type {

compiler/rustc_codegen_ssa/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ impl CrateInfo {
888888
// below.
889889
//
890890
// In order to get this left-to-right dependency ordering, we use the reverse
891-
// postorder of all crates putting the leaves at the right-most positions.
891+
// postorder of all crates putting the leaves at the rightmost positions.
892892
let mut compiler_builtins = None;
893893
let mut used_crates: Vec<_> = tcx
894894
.postorder_cnums(())

compiler/rustc_errors/src/emitter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ impl HumanReadableErrorType {
5858
struct Margin {
5959
/// The available whitespace in the left that can be consumed when centering.
6060
pub whitespace_left: usize,
61-
/// The column of the beginning of left-most span.
61+
/// The column of the beginning of leftmost span.
6262
pub span_left: usize,
63-
/// The column of the end of right-most span.
63+
/// The column of the end of rightmost span.
6464
pub span_right: usize,
6565
/// The beginning of the line to be displayed.
6666
pub computed_left: usize,
@@ -128,7 +128,7 @@ impl Margin {
128128
} else {
129129
0
130130
};
131-
// We want to show as much as possible, max_line_len is the right-most boundary for the
131+
// We want to show as much as possible, max_line_len is the rightmost boundary for the
132132
// relevant code.
133133
self.computed_right = max(max_line_len, self.computed_left);
134134

@@ -685,7 +685,7 @@ impl HumanEmitter {
685685
buffer.puts(line_offset, code_offset, "...", Style::LineNumber);
686686
}
687687
if margin.was_cut_right(line_len) {
688-
// We have stripped some code after the right-most span end, make it clear we did so.
688+
// We have stripped some code after the rightmost span end, make it clear we did so.
689689
buffer.puts(line_offset, code_offset + taken - 3, "...", Style::LineNumber);
690690
}
691691
buffer.puts(line_offset, 0, &self.maybe_anonymized(line_index), Style::LineNumber);

compiler/rustc_expand/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ expand_collapse_debuginfo_illegal =
2525
illegal value for attribute #[collapse_debuginfo(no|external|yes)]
2626
2727
expand_count_repetition_misplaced =
28-
`count` can not be placed inside the inner-most repetition
28+
`count` can not be placed inside the innermost repetition
2929
3030
expand_crate_name_in_cfg_attr =
3131
`crate_name` within an `#![cfg_attr]` attribute is forbidden

compiler/rustc_expand/src/mbe/metavar_expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ pub(crate) enum MetaVarExpr {
2323
/// Ignore a meta-variable for repetition without expansion.
2424
Ignore(Ident),
2525

26-
/// The index of the repetition at a particular depth, where 0 is the inner-most
26+
/// The index of the repetition at a particular depth, where 0 is the innermost
2727
/// repetition. The `usize` is the depth.
2828
Index(usize),
2929

30-
/// The length of the repetition at a particular depth, where 0 is the inner-most
30+
/// The length of the repetition at a particular depth, where 0 is the innermost
3131
/// repetition. The `usize` is the depth.
3232
Len(usize),
3333
}

compiler/rustc_expand/src/mbe/transcribe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ fn lockstep_iter_size(
570570
}
571571
}
572572

573-
/// Used solely by the `count` meta-variable expression, counts the outer-most repetitions at a
573+
/// Used solely by the `count` meta-variable expression, counts the outermost repetitions at a
574574
/// given optional nested depth.
575575
///
576576
/// For example, a macro parameter of `$( { $( $foo:ident ),* } )*` called with `{ a, b } { c }`:

compiler/rustc_hir_typeck/src/upvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ fn truncate_capture_for_optimization(
24572457
) -> (Place<'_>, ty::UpvarCapture) {
24582458
let is_shared_ref = |ty: Ty<'_>| matches!(ty.kind(), ty::Ref(.., hir::Mutability::Not));
24592459

2460-
// Find the right-most deref (if any). All the projections that come after this
2460+
// Find the rightmost deref (if any). All the projections that come after this
24612461
// are fields or other "in-place pointer adjustments"; these refer therefore to
24622462
// data owned by whatever pointer is being dereferenced here.
24632463
let idx = place.projections.iter().rposition(|proj| ProjectionKind::Deref == proj.kind);

compiler/rustc_mir_build/src/build/scope.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,8 +1048,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
10481048
// | +------------|outer_scope cache|--+ |
10491049
// +------------------------------|middle_scope cache|------+
10501050
//
1051-
// Now, a new, inner-most scope is added along with a new drop into
1052-
// both inner-most and outer-most scopes:
1051+
// Now, a new, innermost scope is added along with a new drop into
1052+
// both innermost and outermost scopes:
10531053
//
10541054
// +------------------------------------------------------------+
10551055
// | +----------------------------------+ |
@@ -1061,11 +1061,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
10611061
// +----=----------------|invalid middle_scope cache|-----------+
10621062
//
10631063
// If, when adding `drop(new)` we do not invalidate the cached blocks for both
1064-
// outer_scope and middle_scope, then, when building drops for the inner (right-most)
1064+
// outer_scope and middle_scope, then, when building drops for the inner (rightmost)
10651065
// scope, the old, cached blocks, without `drop(new)` will get used, producing the
10661066
// wrong results.
10671067
//
1068-
// Note that this code iterates scopes from the inner-most to the outer-most,
1068+
// Note that this code iterates scopes from the innermost to the outermost,
10691069
// invalidating caches of each scope visited. This way bare minimum of the
10701070
// caches gets invalidated. i.e., if a new drop is added into the middle scope, the
10711071
// cache of outer scope stays intact.

compiler/rustc_mir_dataflow/src/value_analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ struct PlaceInfo<'tcx> {
11771177
/// The projection used to go from parent to this node (only None for root).
11781178
proj_elem: Option<TrackElem>,
11791179

1180-
/// The left-most child.
1180+
/// The leftmost child.
11811181
first_child: Option<PlaceIndex>,
11821182

11831183
/// Index of the sibling to the right of this node.

0 commit comments

Comments
 (0)