Skip to content

Commit ecdc244

Browse files
committed
"innermost", "outermost", "leftmost", and "rightmost" don't need hyphens
These are all standard dictionary words and don't require hyphenation.
1 parent 9abfcb4 commit ecdc244

File tree

19 files changed

+45
-45
lines changed

19 files changed

+45
-45
lines changed

compiler/rustc_codegen_gcc/src/type_of.rs

+1-1
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

+1-1
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

+1-1
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

+4-4
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

+1-1
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

+2-2
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

+1-1
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

+1-1
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

+4-4
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

+1-1
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.

compiler/rustc_parse/src/lexer/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub(super) fn report_suspicious_mismatch_block(
8585
}
8686
}
8787

88-
// Find the inner-most span candidate for final report
88+
// Find the innermost span candidate for final report
8989
let candidate_span =
9090
matched_spans.into_iter().rev().find(|&(_, same_ident)| !same_ident).map(|(span, _)| span);
9191

library/alloc/src/collections/btree/append.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl<K, V> Root<K, V> {
7979
}
8080
open_node.push(key, value, right_tree);
8181

82-
// Go down to the right-most leaf again.
82+
// Go down to the rightmost leaf again.
8383
cur_node = open_node.forget_type().last_leaf_edge().into_node();
8484
}
8585

library/alloc/src/collections/btree/fix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl<K, V> Root<K, V> {
102102
pub fn fix_right_border_of_plentiful(&mut self) {
103103
let mut cur_node = self.borrow_mut();
104104
while let Internal(internal) = cur_node.force() {
105-
// Check if right-most child is underfull.
105+
// Check if rightmost child is underfull.
106106
let mut last_kv = internal.last_kv().consider_for_balancing();
107107
debug_assert!(last_kv.left_child_len() >= MIN_LEN * 2);
108108
let right_child_len = last_kv.right_child_len();

library/alloc/src/collections/btree/node.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ impl<'a, K: 'a, V: 'a> BalancingContext<'a, K, V> {
15211521
right_node.val_area_mut(..count - 1),
15221522
);
15231523

1524-
// Move the left-most stolen pair to the parent.
1524+
// Move the leftmost stolen pair to the parent.
15251525
let k = left_node.key_area_mut(new_left_len).assume_init_read();
15261526
let v = left_node.val_area_mut(new_left_len).assume_init_read();
15271527
let (k, v) = self.parent.replace_kv(k, v);
@@ -1570,7 +1570,7 @@ impl<'a, K: 'a, V: 'a> BalancingContext<'a, K, V> {
15701570

15711571
// Move leaf data.
15721572
{
1573-
// Move the right-most stolen pair to the parent.
1573+
// Move the rightmost stolen pair to the parent.
15741574
let k = right_node.key_area_mut(count - 1).assume_init_read();
15751575
let v = right_node.val_area_mut(count - 1).assume_init_read();
15761576
let (k, v) = self.parent.replace_kv(k, v);

library/core/src/iter/adapters/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub use self::{
7171
/// this can be useful for specializing [`FromIterator`] implementations or recovering the
7272
/// remaining elements after an iterator has been partially exhausted.
7373
///
74-
/// Note that implementations do not necessarily have to provide access to the inner-most
74+
/// Note that implementations do not necessarily have to provide access to the innermost
7575
/// source of a pipeline. A stateful intermediate adapter might eagerly evaluate a part
7676
/// of the pipeline and expose its internal storage as source.
7777
///

src/doc/rustc/src/symbol-mangling/v0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ The compiler has some latitude in how an entity is encoded as long as the symbol
12081208
12091209
* Named functions, methods, and statics shall be represented by a *[path]* production.
12101210
1211-
* Paths should be rooted at the inner-most entity that can act as a path root.
1211+
* Paths should be rooted at the innermost entity that can act as a path root.
12121212
Roots can be crate-ids, inherent impls, trait impls, and (for items within default methods) trait definitions.
12131213
12141214
* The compiler is free to choose disambiguation indices and namespace tags from

tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs

+17-17
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ fn main() {
66
macro_rules! one_nested_count_and_len {
77
( $( [ $( $l:literal ),* ] ),* ) => {
88
[
9-
// outer-most repetition
9+
// outermost repetition
1010
$(
11-
// inner-most repetition
11+
// innermost repetition
1212
$(
1313
${ignore($l)} ${index()}, ${len()},
1414
)*
@@ -23,34 +23,34 @@ fn main() {
2323
[
2424
// # ["foo"]
2525

26-
// ## inner-most repetition (first iteration)
26+
// ## innermost repetition (first iteration)
2727
//
28-
// `index` is 0 because this is the first inner-most iteration.
29-
// `len` is 1 because there is only one inner-most repetition, "foo".
28+
// `index` is 0 because this is the first innermost iteration.
29+
// `len` is 1 because there is only one innermost repetition, "foo".
3030
0, 1,
31-
// ## outer-most repetition (first iteration)
31+
// ## outermost repetition (first iteration)
3232
//
3333
// `count` is 1 because of "foo", i,e, `$l` has only one repetition,
34-
// `index` is 0 because this is the first outer-most iteration.
35-
// `len` is 2 because there are 2 outer-most repetitions, ["foo"] and ["bar", "baz"]
34+
// `index` is 0 because this is the first outermost iteration.
35+
// `len` is 2 because there are 2 outermost repetitions, ["foo"] and ["bar", "baz"]
3636
1, 0, 2,
3737
// # ["bar", "baz"]
3838

39-
// ## inner-most repetition (first iteration)
39+
// ## innermost repetition (first iteration)
4040
//
41-
// `index` is 0 because this is the first inner-most iteration
41+
// `index` is 0 because this is the first innermost iteration
4242
// `len` is 2 because there are repetitions, "bar" and "baz"
4343
0, 2,
44-
// ## inner-most repetition (second iteration)
44+
// ## innermost repetition (second iteration)
4545
//
46-
// `index` is 1 because this is the second inner-most iteration
46+
// `index` is 1 because this is the second innermost iteration
4747
// `len` is 2 because there are repetitions, "bar" and "baz"
4848
1, 2,
49-
// ## outer-most repetition (second iteration)
49+
// ## outermost repetition (second iteration)
5050
//
5151
// `count` is 2 because of "bar" and "baz", i,e, `$l` has two repetitions,
52-
// `index` is 1 because this is the second outer-most iteration
53-
// `len` is 2 because there are 2 outer-most repetitions, ["foo"] and ["bar", "baz"]
52+
// `index` is 1 because this is the second outermost iteration
53+
// `len` is 2 because there are 2 outermost repetitions, ["foo"] and ["bar", "baz"]
5454
2, 1, 2,
5555
// # last count
5656

@@ -61,7 +61,7 @@ fn main() {
6161

6262
// Based on the above explanation, the following macros should be straightforward
6363

64-
// Grouped from the outer-most to the inner-most
64+
// Grouped from the outermost to the innermost
6565
macro_rules! three_nested_count {
6666
( $( { $( [ $( ( $( $i:ident )* ) )* ] )* } )* ) => {
6767
&[
@@ -156,7 +156,7 @@ fn main() {
156156
][..]
157157
);
158158

159-
// Grouped from the outer-most to the inner-most
159+
// Grouped from the outermost to the innermost
160160
macro_rules! three_nested_len {
161161
( $( { $( [ $( ( $( $i:ident )* ) )* ] )* } )* ) => {
162162
&[

tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ macro_rules! curly__no_rhs_dollar__round {
1010

1111
macro_rules! curly__no_rhs_dollar__no_round {
1212
( $i:ident ) => { ${ count($i) } };
13-
//~^ ERROR `count` can not be placed inside the inner-most repetition
13+
//~^ ERROR `count` can not be placed inside the innermost repetition
1414
}
1515

1616
macro_rules! curly__rhs_dollar__no_round {
1717
( $i:ident ) => { ${ count($i) } };
18-
//~^ ERROR `count` can not be placed inside the inner-most repetition
18+
//~^ ERROR `count` can not be placed inside the innermost repetition
1919
}
2020

2121
#[rustfmt::skip] // autoformatters can break a few of the error traces

tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ error: expected identifier or string literal
196196
LL | ( $( $i:ident ),* ) => { ${ {} } };
197197
| ^^
198198

199-
error: `count` can not be placed inside the inner-most repetition
199+
error: `count` can not be placed inside the innermost repetition
200200
--> $DIR/syntax-errors.rs:12:24
201201
|
202202
LL | ( $i:ident ) => { ${ count($i) } };
203203
| ^^^^^^^^^^^^^
204204

205-
error: `count` can not be placed inside the inner-most repetition
205+
error: `count` can not be placed inside the innermost repetition
206206
--> $DIR/syntax-errors.rs:17:24
207207
|
208208
LL | ( $i:ident ) => { ${ count($i) } };

0 commit comments

Comments
 (0)