Skip to content

Commit ff2c609

Browse files
committed
Match unmatched backticks in compiler/ that are part of rustdoc
1 parent 13471d3 commit ff2c609

File tree

22 files changed

+23
-23
lines changed

22 files changed

+23
-23
lines changed

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_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_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_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

+2-2
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
}
@@ -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/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -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/coverage/spans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -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_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_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_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_trait_selection/src/traits/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
11751175
/// paths you want to take. To make things worse, it was possible for
11761176
/// cycles to arise, where you basically had a setup like `<MyType<$0>
11771177
/// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0> as
1178-
/// Trait>::Foo> to `[type error]` would lead to an obligation of
1178+
/// Trait>::Foo>` to `[type error]` would lead to an obligation of
11791179
/// `<MyType<[type error]> as Trait>::Foo`. We are supposed to report
11801180
/// an error for this obligation, but we legitimately should not,
11811181
/// because it contains `[type error]`. Yuck! (See issue #29857 for

compiler/rustc_trait_selection/src/traits/select/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct TraitObligationStack<'prev, 'tcx> {
151151
/// you don't want to cache that `B: AutoTrait` or `A: AutoTrait`
152152
/// is `EvaluatedToOk`; this is because they were only considered
153153
/// ok on the premise that if `A: AutoTrait` held, but we indeed
154-
/// encountered a problem (later on) with `A: AutoTrait. So we
154+
/// encountered a problem (later on) with `A: AutoTrait`. So we
155155
/// currently set a flag on the stack node for `B: AutoTrait` (as
156156
/// well as the second instance of `A: AutoTrait`) to suppress
157157
/// caching.

0 commit comments

Comments
 (0)