Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6df5ae4

Browse files
committed
Match unmatched backticks in comments in compiler/
1 parent ff2c609 commit 6df5ae4

File tree

24 files changed

+28
-25
lines changed

24 files changed

+28
-25
lines changed

compiler/rustc_ast/src/util/parser.rs

Lines changed: 1 addition & 1 deletion
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_passes/src/ast_validation.rs

Lines changed: 1 addition & 1 deletion
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_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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_metadata/src/rmeta/encoder.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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/ty/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.

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

Lines changed: 1 addition & 1 deletion
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() => {

0 commit comments

Comments
 (0)