Skip to content

Commit 1acc3a9

Browse files
author
Lukas Markeffsky
committed
compiler: Fix bugs found by rustdoc::unescaped_backtick
1 parent 414d329 commit 1acc3a9

File tree

21 files changed

+24
-24
lines changed

21 files changed

+24
-24
lines changed

compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
15741574
hir::OwnerNode::Item(self.arena.alloc(opaque_ty_item))
15751575
}
15761576

1577-
/// Given a `parent_def_id`, a list of `lifetimes_in_bounds and a `remapping` hash to be
1577+
/// Given a `parent_def_id`, a list of `lifetimes_in_bounds` and a `remapping` hash to be
15781578
/// filled, this function creates new definitions for `Param` and `Fresh` lifetimes, inserts the
15791579
/// new definition, adds it to the remapping with the definition of the given lifetime and
15801580
/// 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
@@ -363,7 +363,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
363363
/// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }
364364
/// ```
365365
///
366-
/// Here we would be invoked with `fr = 'a` and `outlived_fr = `'b`.
366+
/// Here we would be invoked with `fr = 'a` and `outlived_fr = 'b`.
367367
pub(crate) fn report_region_error(
368368
&mut self,
369369
fr: RegionVid,

compiler/rustc_borrowck/src/region_infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
794794
/// from a universe it can't name; at present, the only way for
795795
/// this to be true is if `scc` outlives `'static`. This is
796796
/// actually stricter than necessary: ideally, we'd support bounds
797-
/// like `for<'a: 'b`>` that might then allow us to approximate
797+
/// like `for<'a: 'b>` that might then allow us to approximate
798798
/// `'a` with `'b` and not `'static`. But it will have to do for
799799
/// now.
800800
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
@@ -234,7 +234,7 @@ pub(crate) struct RegionValues<N: Idx> {
234234
free_regions: SparseBitMatrix<N, RegionVid>,
235235

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

compiler/rustc_hir_typeck/src/closure.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
372372
/// ```
373373
///
374374
/// Here:
375-
/// - E would be `fn(&u32) -> &u32`.
376-
/// - S would be `fn(&u32) ->
375+
/// - E would be `fn(&u32) -> &u32`
376+
/// - S would be `fn(&u32) ->`
377377
/// - E' is `&'!0 u32 -> &'!0 u32`
378378
/// - S' is `&'?0 u32 -> ?T`
379379
///

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
@@ -51,7 +51,7 @@ impl<'tcx> InferCtxt<'tcx> {
5151

5252
/// Like [Self::canonicalize_query], but preserves distinct universes. For
5353
/// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
54-
/// `'?1` is in `U3` would be canonicalized to have ?0` in `U1` and `'?1`
54+
/// `'?1` is in `U3` would be canonicalized to have `?0` in `U1` and `'?1`
5555
/// in `U2`.
5656
///
5757
/// 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
@@ -55,7 +55,7 @@ where
5555
///
5656
/// - Covariant means `a <: b`.
5757
/// - Contravariant means `b <: a`.
58-
/// - Invariant means `a == b.
58+
/// - Invariant means `a == b`.
5959
/// - Bivariant means that it doesn't matter.
6060
ambient_variance: ty::Variance,
6161

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

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

compiler/rustc_lexer/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pub enum DocStyle {
174174
pub enum LiteralKind {
175175
/// "12_u8", "0o100", "0b120i99", "1f32".
176176
Int { base: Base, empty_int: bool },
177-
/// "12.34f32", "1e3", but not "1f32`.
177+
/// "12.34f32", "1e3", but not "1f32".
178178
Float { base: Base, empty_exponent: bool },
179179
/// "'a'", "'\\'", "'''", "';"
180180
Char { terminated: bool },

compiler/rustc_middle/src/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ rustc_queries! {
16131613

16141614
/// Does lifetime resolution on items. Importantly, we can't resolve
16151615
/// lifetimes directly on things like trait methods, because of trait params.
1616-
/// See `rustc_resolve::late::lifetimes for details.
1616+
/// See `rustc_resolve::late::lifetimes` for details.
16171617
query resolve_lifetimes(_: hir::OwnerId) -> ResolveLifetimes {
16181618
arena_cache
16191619
desc { "resolving lifetimes" }

compiler/rustc_middle/src/ty/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub use int::*;
1414
pub use kind::*;
1515
pub use valtree::*;
1616

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

compiler/rustc_middle/src/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,7 @@ impl<'tcx> TyCtxtAt<'tcx> {
23682368
self.tcx.ty_error_with_message(self.span, "TyKind::Error constructed but no error reported")
23692369
}
23702370

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

compiler/rustc_middle/src/ty/fold.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! It defines a "skeleton" of how they should be folded.
1919
//! - `TypeSuperFoldable`. This is implemented only for each type of interest,
2020
//! and defines the folding "skeleton" for these types.
21-
//! - `TypeFolder`/`FallibleTypeFolder. One of these is implemented for each
21+
//! - `TypeFolder`/`FallibleTypeFolder`. One of these is implemented for each
2222
//! folder. This defines how types of interest are folded.
2323
//!
2424
//! This means each fold is a mixture of (a) generic folding operations, and (b)

compiler/rustc_mir_transform/src/coverage/spans.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,9 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
692692
/// `pending_dups` spans, if any). Keep in mind, `prev.span()` may have been changed.
693693
/// If prev.span() was merged into other spans (with matching BCB, for instance),
694694
/// `prev.span.hi()` will be greater than (further right of) `prev_original_span.hi()`.
695-
/// If prev.span() was split off to the right of a closure, prev.span().lo() will be
696-
/// 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(),
695+
/// If prev.span() was split off to the right of a closure, `prev.span().lo()` will be
696+
/// 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()`,
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
@@ -329,7 +329,7 @@ impl<'a> Resolver<'a> {
329329
/// This is a variation of `fn resolve_ident_in_lexical_scope` that can be run during
330330
/// expansion and import resolution (perhaps they can be merged in the future).
331331
/// The function is used for resolving initial segments of macro paths (e.g., `foo` in
332-
/// `foo::bar!(); or `foo!();`) and also for import paths on 2018 edition.
332+
/// `foo::bar!();` or `foo!();`) and also for import paths on 2018 edition.
333333
#[instrument(level = "debug", skip(self, scope_set))]
334334
pub(crate) fn early_resolve_ident_in_lexical_scope(
335335
&mut self,

compiler/rustc_trait_selection/src/traits/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
11711171
/// paths you want to take. To make things worse, it was possible for
11721172
/// cycles to arise, where you basically had a setup like `<MyType<$0>
11731173
/// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0> as
1174-
/// Trait>::Foo> to `[type error]` would lead to an obligation of
1174+
/// Trait>::Foo>` to `[type error]` would lead to an obligation of
11751175
/// `<MyType<[type error]> as Trait>::Foo`. We are supposed to report
11761176
/// an error for this obligation, but we legitimately should not,
11771177
/// 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
@@ -147,7 +147,7 @@ struct TraitObligationStack<'prev, 'tcx> {
147147
/// you don't want to cache that `B: AutoTrait` or `A: AutoTrait`
148148
/// is `EvaluatedToOk`; this is because they were only considered
149149
/// ok on the premise that if `A: AutoTrait` held, but we indeed
150-
/// encountered a problem (later on) with `A: AutoTrait. So we
150+
/// encountered a problem (later on) with `A: AutoTrait`. So we
151151
/// currently set a flag on the stack node for `B: AutoTrait` (as
152152
/// well as the second instance of `A: AutoTrait`) to suppress
153153
/// caching.

0 commit comments

Comments
 (0)