Skip to content

Commit 01fc5a7

Browse files
authored
Rollup merge of #108694 - est31:backticks_matchmaking_comments, r=Nilstrieb
Match unmatched backticks in compiler/ comments r? ``@Nilstrieb`` as per [advice](#108685 (comment))
2 parents 846424d + 6df5ae4 commit 01fc5a7

File tree

42 files changed

+51
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+51
-48
lines changed

compiler/rustc_ast/src/util/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl AssocOp {
225225
AssignOp(_) | // `{ 42 } +=`
226226
As | // `{ 42 } as usize`
227227
// Equal | // `{ 42 } == { 42 }` Accepting these here would regress incorrect
228-
// NotEqual | // `{ 42 } != { 42 } struct literals parser recovery.
228+
// NotEqual | // `{ 42 } != { 42 }` struct literals parser recovery.
229229
Colon, // `{ 42 }: usize`
230230
)
231231
}

compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
16071607
hir::OwnerNode::Item(self.arena.alloc(opaque_ty_item))
16081608
}
16091609

1610-
/// Given a `parent_def_id`, a list of `lifetimes_in_bounds and a `remapping` hash to be
1610+
/// Given a `parent_def_id`, a list of `lifetimes_in_bounds` and a `remapping` hash to be
16111611
/// filled, this function creates new definitions for `Param` and `Fresh` lifetimes, inserts the
16121612
/// new definition, adds it to the remapping with the definition of the given lifetime and
16131613
/// returns a list of lifetimes to be lowered afterwards.

compiler/rustc_ast_passes/src/ast_validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl<'a> AstValidator<'a> {
192192
// We allow these:
193193
// - `Option<impl Trait>`
194194
// - `option::Option<impl Trait>`
195-
// - `option::Option<T>::Foo<impl Trait>
195+
// - `option::Option<T>::Foo<impl Trait>`
196196
//
197197
// But not these:
198198
// - `<impl Trait>::Foo`

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
415415
/// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }
416416
/// ```
417417
///
418-
/// Here we would be invoked with `fr = 'a` and `outlived_fr = `'b`.
418+
/// Here we would be invoked with `fr = 'a` and `outlived_fr = 'b`.
419419
pub(crate) fn report_region_error(
420420
&mut self,
421421
fr: RegionVid,

compiler/rustc_borrowck/src/region_infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
889889
/// from a universe it can't name; at present, the only way for
890890
/// this to be true is if `scc` outlives `'static`. This is
891891
/// actually stricter than necessary: ideally, we'd support bounds
892-
/// like `for<'a: 'b`>` that might then allow us to approximate
892+
/// like `for<'a: 'b>` that might then allow us to approximate
893893
/// `'a` with `'b` and not `'static`. But it will have to do for
894894
/// now.
895895
fn add_incompatible_universe(&mut self, scc: ConstraintSccIndex) {

compiler/rustc_borrowck/src/region_infer/values.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ pub(crate) struct RegionValues<N: Idx> {
235235
free_regions: SparseBitMatrix<N, RegionVid>,
236236

237237
/// Placeholders represent bound regions -- so something like `'a`
238-
/// in for<'a> fn(&'a u32)`.
238+
/// in `for<'a> fn(&'a u32)`.
239239
placeholders: SparseBitMatrix<N, PlaceholderIndex>,
240240
}
241241

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ pub(super) fn check_type_bounds<'tcx>(
18731873
// type Bar<C> =...
18741874
// }
18751875
//
1876-
// - `impl_trait_ref` would be `<(A, B) as Foo<u32>>
1876+
// - `impl_trait_ref` would be `<(A, B) as Foo<u32>>`
18771877
// - `impl_ty_substs` would be `[A, B, ^0.0]` (`^0.0` here is the bound var with db 0 and index 0)
18781878
// - `rebased_substs` would be `[(A, B), u32, ^0.0]`, combining the substs from
18791879
// the *trait* with the generic associated type parameters (as bound vars).

compiler/rustc_hir_analysis/src/coherence/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUn
437437
}
438438

439439
// Here we are considering a case of converting
440-
// `S<P0...Pn>` to S<Q0...Qn>`. As an example, let's imagine a struct `Foo<T, U>`,
440+
// `S<P0...Pn>` to `S<Q0...Qn>`. As an example, let's imagine a struct `Foo<T, U>`,
441441
// which acts like a pointer to `U`, but carries along some extra data of type `T`:
442442
//
443443
// struct Foo<T, U> {

compiler/rustc_hir_typeck/src/mem_categorization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
636636
// `&&Some(x,)` `place_foo`
637637
// `&Some(x,)` `deref { place_foo}`
638638
// `Some(x,)` `deref { deref { place_foo }}`
639-
// (x,)` `field0 { deref { deref { place_foo }}}` <- resulting place
639+
// `(x,)` `field0 { deref { deref { place_foo }}}` <- resulting place
640640
//
641641
// The above example has no adjustments. If the code were instead the (after adjustments,
642642
// equivalent) version

compiler/rustc_hir_typeck/src/upvar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ fn determine_place_ancestry_relation<'tcx>(
22232223
/// || drop(&*m.a.field_of_a)
22242224
/// // Here we really do want to capture `*m.a` because that outlives `'static`
22252225
///
2226-
/// // If we capture `m`, then the closure no longer outlives `'static'
2226+
/// // If we capture `m`, then the closure no longer outlives `'static`
22272227
/// // it is constrained to `'a`
22282228
/// }
22292229
/// ```

compiler/rustc_incremental/src/assert_module_sources.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! the HIR doesn't change as a result of the annotations, which might
1919
//! perturb the reuse results.
2020
//!
21-
//! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
21+
//! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]`
2222
//! allows for doing a more fine-grained check to see if pre- or post-lto data
2323
//! was re-used.
2424

compiler/rustc_index/src/bit_set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
18701870
}
18711871
}
18721872

1873-
/// Subtracts `set from `row`. `set` can be either `BitSet` or
1873+
/// Subtracts `set` from `row`. `set` can be either `BitSet` or
18741874
/// `HybridBitSet`. Has no effect if `row` does not exist.
18751875
///
18761876
/// Returns true if the row was changed.

compiler/rustc_infer/src/infer/canonical/canonicalizer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl<'tcx> InferCtxt<'tcx> {
5050

5151
/// Like [Self::canonicalize_query], but preserves distinct universes. For
5252
/// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
53-
/// `'?1` is in `U3` would be canonicalized to have ?0` in `U1` and `'?1`
53+
/// `'?1` is in `U3` would be canonicalized to have `?0` in `U1` and `'?1`
5454
/// in `U2`.
5555
///
5656
/// This is used for Chalk integration.

compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub enum RegionResolutionError<'tcx> {
7070
/// `o` requires that `a <= b`, but this does not hold
7171
ConcreteFailure(SubregionOrigin<'tcx>, Region<'tcx>, Region<'tcx>),
7272

73-
/// `GenericBoundFailure(p, s, a)
73+
/// `GenericBoundFailure(p, s, a)`:
7474
///
7575
/// The parameter/associated-type `p` must be known to outlive the lifetime
7676
/// `a` (but none of the known bounds are sufficient).

compiler/rustc_infer/src/infer/nll_relate/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ where
5050
///
5151
/// - Covariant means `a <: b`.
5252
/// - Contravariant means `b <: a`.
53-
/// - Invariant means `a == b.
53+
/// - Invariant means `a == b`.
5454
/// - Bivariant means that it doesn't matter.
5555
ambient_variance: ty::Variance,
5656

compiler/rustc_infer/src/infer/region_constraints/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub enum VerifyBound<'tcx> {
249249
/// in that case we can show `'b: 'c`. But if `'?x` winds up being something
250250
/// else, the bound isn't relevant.
251251
///
252-
/// In the [`VerifyBound`], this struct is enclosed in `Binder to account
252+
/// In the [`VerifyBound`], this struct is enclosed in `Binder` to account
253253
/// for cases like
254254
///
255255
/// ```rust

compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ declare_lint! {
12881288
}
12891289

12901290
declare_lint_pass!(
1291-
/// Explains corresponding feature flag must be enabled for the `#[track_caller] attribute to
1291+
/// Explains corresponding feature flag must be enabled for the `#[track_caller]` attribute to
12921292
/// do anything
12931293
UngatedAsyncFnTrackCaller => [UNGATED_ASYNC_FN_TRACK_CALLER]
12941294
);

compiler/rustc_metadata/src/rmeta/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16211621
#[instrument(level = "debug", skip(self))]
16221622
fn encode_info_for_closure(&mut self, def_id: LocalDefId) {
16231623
// NOTE(eddyb) `tcx.type_of(def_id)` isn't used because it's fully generic,
1624-
// including on the signature, which is inferred in `typeck.
1624+
// including on the signature, which is inferred in `typeck`.
16251625
let typeck_result: &'tcx ty::TypeckResults<'tcx> = self.tcx.typeck(def_id);
16261626
let hir_id = self.tcx.hir().local_def_id_to_hir_id(def_id);
16271627
let ty = typeck_result.node_type(hir_id);

compiler/rustc_middle/src/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2908,7 +2908,7 @@ fn pretty_print_const_value<'tcx>(
29082908
// the `destructure_const` query with an empty `ty::ParamEnv` without
29092909
// introducing ICEs (e.g. via `layout_of`) from missing bounds.
29102910
// E.g. `transmute([0usize; 2]): (u8, *mut T)` needs to know `T: Sized`
2911-
// to be able to destructure the tuple into `(0u8, *mut T)
2911+
// to be able to destructure the tuple into `(0u8, *mut T)`
29122912
//
29132913
// FIXME(eddyb) for `--emit=mir`/`-Z dump-mir`, we should provide the
29142914
// correct `ty::ParamEnv` to allow printing *all* constant values.

compiler/rustc_middle/src/mir/spanview.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::io::{self, Write};
1111
pub const TOOLTIP_INDENT: &str = " ";
1212

1313
const CARET: char = '\u{2038}'; // Unicode `CARET`
14-
const ANNOTATION_LEFT_BRACKET: char = '\u{298a}'; // Unicode `Z NOTATION RIGHT BINDING BRACKET
14+
const ANNOTATION_LEFT_BRACKET: char = '\u{298a}'; // Unicode `Z NOTATION RIGHT BINDING BRACKET`
1515
const ANNOTATION_RIGHT_BRACKET: char = '\u{2989}'; // Unicode `Z NOTATION LEFT BINDING BRACKET`
1616
const NEW_LINE_SPAN: &str = "</span>\n<span class=\"line\">";
1717
const HEADER: &str = r#"<!DOCTYPE html>

compiler/rustc_middle/src/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ rustc_queries! {
16721672

16731673
/// Does lifetime resolution on items. Importantly, we can't resolve
16741674
/// lifetimes directly on things like trait methods, because of trait params.
1675-
/// See `rustc_resolve::late::lifetimes for details.
1675+
/// See `rustc_resolve::late::lifetimes` for details.
16761676
query resolve_bound_vars(_: hir::OwnerId) -> &'tcx ResolveBoundVars {
16771677
arena_cache
16781678
desc { "resolving lifetimes" }

compiler/rustc_middle/src/ty/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub use int::*;
1616
pub use kind::*;
1717
pub use valtree::*;
1818

19-
/// Use this rather than `ConstData, whenever possible.
19+
/// Use this rather than `ConstData`, whenever possible.
2020
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
2121
#[rustc_pass_by_value]
2222
pub struct Const<'tcx>(pub(super) Interned<'tcx, ConstData<'tcx>>);

compiler/rustc_middle/src/ty/context.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ pub struct CommonLifetimes<'tcx> {
310310
pub re_vars: Vec<Region<'tcx>>,
311311

312312
/// Pre-interned values of the form:
313-
/// `ReLateBound(DebruijnIndex(i), BoundRegion { var: v, kind: BrAnon(v, None) })
313+
/// `ReLateBound(DebruijnIndex(i), BoundRegion { var: v, kind: BrAnon(v, None) })`
314314
/// for small values of `i` and `v`.
315315
pub re_late_bounds: Vec<Vec<Region<'tcx>>>,
316316
}
@@ -2187,7 +2187,7 @@ impl<'tcx> TyCtxt<'tcx> {
21872187
// Actually intern type lists as lists of `GenericArg`s.
21882188
//
21892189
// Transmuting from `Ty<'tcx>` to `GenericArg<'tcx>` is sound
2190-
// as explained in ty_slice_as_generic_arg`. With this,
2190+
// as explained in `ty_slice_as_generic_arg`. With this,
21912191
// we guarantee that even when transmuting between `List<Ty<'tcx>>`
21922192
// and `List<GenericArg<'tcx>>`, the uniqueness requirement for
21932193
// lists is upheld.
@@ -2450,7 +2450,7 @@ impl<'tcx> TyCtxtAt<'tcx> {
24502450
self.tcx.ty_error_with_message(self.span, "TyKind::Error constructed but no error reported")
24512451
}
24522452

2453-
/// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
2453+
/// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg` to
24542454
/// ensure it gets used.
24552455
#[track_caller]
24562456
pub fn ty_error_with_message(self, msg: &str) -> Ty<'tcx> {

compiler/rustc_middle/src/ty/inhabitedness/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<'tcx> VariantDef {
105105
impl<'tcx> Ty<'tcx> {
106106
pub fn inhabited_predicate(self, tcx: TyCtxt<'tcx>) -> InhabitedPredicate<'tcx> {
107107
match self.kind() {
108-
// For now, union`s are always considered inhabited
108+
// For now, unions are always considered inhabited
109109
Adt(adt, _) if adt.is_union() => InhabitedPredicate::True,
110110
// Non-exhaustive ADTs from other crates are always considered inhabited
111111
Adt(adt, _) if adt.is_variant_list_non_exhaustive() && !adt.did().is_local() => {

compiler/rustc_middle/src/ty/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ impl<'tcx> Predicate<'tcx> {
710710
// The substitution from the input trait-ref is therefore going to be
711711
// `'a => 'x` (where `'x` has a DB index of 1).
712712
// - The supertrait-ref is `for<'b> Bar1<'a,'b>`, where `'a` is an
713-
// early-bound parameter and `'b' is a late-bound parameter with a
713+
// early-bound parameter and `'b` is a late-bound parameter with a
714714
// DB index of 1.
715715
// - If we replace `'a` with `'x` from the input, it too will have
716716
// a DB index of 1, and thus we'll have `for<'x,'b> Bar1<'x,'b>`
@@ -2444,7 +2444,7 @@ impl<'tcx> TyCtxt<'tcx> {
24442444
None
24452445
}
24462446

2447-
/// Check if the given `DefId` is `#\[automatically_derived\], *and*
2447+
/// Check if the given `DefId` is `#\[automatically_derived\]`, *and*
24482448
/// whether it was produced by expanding a builtin derive macro.
24492449
pub fn is_builtin_derived(self, def_id: DefId) -> bool {
24502450
if self.is_automatically_derived(def_id)

compiler/rustc_mir_transform/src/check_const_item_mutation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'tcx> ConstMutationChecker<'_, 'tcx> {
7474
//
7575
// `unsafe { *FOO = 0; *BAR.field = 1; }`
7676
// `unsafe { &mut *FOO }`
77-
// `unsafe { (*ARRAY)[0] = val; }
77+
// `unsafe { (*ARRAY)[0] = val; }`
7878
if !place.projection.iter().any(|p| matches!(p, PlaceElem::Deref)) {
7979
let source_info = self.body.source_info(location);
8080
let lint_root = self.body.source_scopes[source_info.scope]

compiler/rustc_mir_transform/src/coverage/spans.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
407407
if self.prev().is_macro_expansion() && self.curr().is_macro_expansion() {
408408
// Macros that expand to include branching (such as
409409
// `assert_eq!()`, `assert_ne!()`, `info!()`, `debug!()`, or
410-
// `trace!()) typically generate callee spans with identical
410+
// `trace!()`) typically generate callee spans with identical
411411
// ranges (typically the full span of the macro) for all
412412
// `BasicBlocks`. This makes it impossible to distinguish
413413
// the condition (`if val1 != val2`) from the optional
@@ -694,7 +694,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
694694
/// `prev.span.hi()` will be greater than (further right of) `prev_original_span.hi()`.
695695
/// If prev.span() was split off to the right of a closure, prev.span().lo() will be
696696
/// greater than prev_original_span.lo(). The actual span of `prev_original_span` is
697-
/// not as important as knowing that `prev()` **used to have the same span** as `curr(),
697+
/// not as important as knowing that `prev()` **used to have the same span** as `curr()`,
698698
/// which means their sort order is still meaningful for determining the dominator
699699
/// relationship.
700700
///

compiler/rustc_mir_transform/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) ->
248248

249249
// N.B., this `borrow()` is guaranteed to be valid (i.e., the value
250250
// cannot yet be stolen), because `mir_promoted()`, which steals
251-
// from `mir_const(), forces this query to execute before
251+
// from `mir_const()`, forces this query to execute before
252252
// performing the steal.
253253
let body = &tcx.mir_const(def).borrow();
254254

compiler/rustc_mir_transform/src/lower_slice_len.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ fn lower_slice_len_call<'tcx>(
6868
ty::FnDef(fn_def_id, _) if fn_def_id == &slice_len_fn_item_def_id => {
6969
// perform modifications
7070
// from something like `_5 = core::slice::<impl [u8]>::len(move _6) -> bb1`
71-
// into `_5 = Len(*_6)
71+
// into:
72+
// ```
73+
// _5 = Len(*_6)
7274
// goto bb1
75+
// ```
7376

7477
// make new RValue for Len
7578
let deref_arg = tcx.mk_place_deref(arg);

compiler/rustc_parse/src/parser/attr_wrapper.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ impl ToAttrTokenStream for LazyAttrTokenStreamImpl {
134134
// Process the replace ranges, starting from the highest start
135135
// position and working our way back. If have tokens like:
136136
//
137-
// `#[cfg(FALSE)]` struct Foo { #[cfg(FALSE)] field: bool }`
137+
// `#[cfg(FALSE)] struct Foo { #[cfg(FALSE)] field: bool }`
138138
//
139139
// Then we will generate replace ranges for both
140140
// the `#[cfg(FALSE)] field: bool` and the entire
141-
// `#[cfg(FALSE)]` struct Foo { #[cfg(FALSE)] field: bool }`
141+
// `#[cfg(FALSE)] struct Foo { #[cfg(FALSE)] field: bool }`
142142
//
143143
// By starting processing from the replace range with the greatest
144144
// start position, we ensure that any replace range which encloses

compiler/rustc_parse/src/parser/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ impl TokenCursor {
335335
num_of_hashes = cmp::max(num_of_hashes, count);
336336
}
337337

338-
// `/// foo` becomes `doc = r"foo".
338+
// `/// foo` becomes `doc = r"foo"`.
339339
let delim_span = DelimSpan::from_single(span);
340340
let body = TokenTree::Delimited(
341341
delim_span,

compiler/rustc_passes/src/hir_stats.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
646646
}
647647

648648
// `UseTree` has one inline use (in `ast::ItemKind::Use`) and one
649-
// non-inline use (in `ast::UseTreeKind::Nested). The former case is more
649+
// non-inline use (in `ast::UseTreeKind::Nested`). The former case is more
650650
// common, so we don't implement `visit_use_tree` and tolerate the missed
651651
// coverage in the latter case.
652652

compiler/rustc_passes/src/liveness/rwu_table.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub(super) struct RWU {
99
}
1010

1111
/// Conceptually, this is like a `Vec<Vec<RWU>>`. But the number of
12-
/// RWU`s can get very large, so it uses a more compact representation.
12+
/// RWU's can get very large, so it uses a more compact representation.
1313
pub(super) struct RWUTable {
1414
/// Total number of live nodes.
1515
live_nodes: usize,

compiler/rustc_query_impl/src/on_disk_cache.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ impl<'sess> rustc_middle::ty::OnDiskCache<'sess> for OnDiskCache<'sess> {
333333
},
334334
);
335335

336-
// `Encode the file footer.
336+
// Encode the file footer.
337337
let footer_pos = encoder.position() as u64;
338338
encoder.encode_tagged(
339339
TAG_FILE_FOOTER,

compiler/rustc_resolve/src/ident.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
368368
/// This is a variation of `fn resolve_ident_in_lexical_scope` that can be run during
369369
/// expansion and import resolution (perhaps they can be merged in the future).
370370
/// The function is used for resolving initial segments of macro paths (e.g., `foo` in
371-
/// `foo::bar!(); or `foo!();`) and also for import paths on 2018 edition.
371+
/// `foo::bar!();` or `foo!();`) and also for import paths on 2018 edition.
372372
#[instrument(level = "debug", skip(self, scope_set))]
373373
pub(crate) fn early_resolve_ident_in_lexical_scope(
374374
&mut self,

compiler/rustc_resolve/src/late/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
878878
);
879879
let is_assoc_fn = self.self_type_is_available();
880880
if let Some((fn_kind, span)) = &self.diagnostic_metadata.current_function {
881-
// The current function has a `self' parameter, but we were unable to resolve
881+
// The current function has a `self` parameter, but we were unable to resolve
882882
// a reference to `self`. This can only happen if the `self` identifier we
883883
// are resolving came from a different hygiene context.
884884
if fn_kind.decl().inputs.get(0).map_or(false, |p| p.is_self()) {

compiler/rustc_session/src/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,7 @@ pub enum PpMode {
27922792
HirTree,
27932793
/// `-Zunpretty=thir-tree`
27942794
ThirTree,
2795-
/// `-Zunpretty=`thir-flat`
2795+
/// `-Zunpretty=thir-flat`
27962796
ThirFlat,
27972797
/// `-Zunpretty=mir`
27982798
Mir,

compiler/rustc_span/src/def_id.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl<D: Decoder> Decodable<D> for DefIndex {
235235
pub struct DefId {
236236
// cfg-ing the order of fields so that the `DefIndex` which is high entropy always ends up in
237237
// the lower bits no matter the endianness. This allows the compiler to turn that `Hash` impl
238-
// into a direct call to 'u64::hash(_)`.
238+
// into a direct call to `u64::hash(_)`.
239239
#[cfg(not(all(target_pointer_width = "64", target_endian = "big")))]
240240
pub index: DefIndex,
241241
pub krate: CrateNum,

compiler/rustc_span/src/symbol.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ impl Interner {
19541954
let name = Symbol::new(inner.strings.len() as u32);
19551955

19561956
// SAFETY: we convert from `&str` to `&[u8]`, clone it into the arena,
1957-
// and immediately convert the clone back to `&[u8], all because there
1957+
// and immediately convert the clone back to `&[u8]`, all because there
19581958
// is no `inner.arena.alloc_str()` method. This is clearly safe.
19591959
let string: &str =
19601960
unsafe { str::from_utf8_unchecked(inner.arena.alloc_slice(string.as_bytes())) };

0 commit comments

Comments
 (0)