Skip to content

Commit 97cf378

Browse files
authored
Rollup merge of #71787 - tshepang:rustdoc-warnings, r=varkor
fix rustdoc warnings
2 parents 5a7b21f + 3be52b5 commit 97cf378

File tree

27 files changed

+56
-45
lines changed

27 files changed

+56
-45
lines changed

src/librustc_builtin_macros/deriving/generic/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub enum Ty<'a> {
9898
Self_,
9999
/// &/Box/ Ty
100100
Ptr(Box<Ty<'a>>, PtrTy),
101-
/// mod::mod::Type<[lifetime], [Params...]>, including a plain type
101+
/// `mod::mod::Type<[lifetime], [Params...]>`, including a plain type
102102
/// parameter, and things like `i32`
103103
Literal(Path<'a>),
104104
/// includes unit

src/librustc_builtin_macros/test_harness.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ fn generate_test_harness(
233233
///
234234
/// By default this expands to
235235
///
236+
/// ```
236237
/// #[main]
237238
/// pub fn main() {
238239
/// extern crate test;
@@ -242,6 +243,7 @@ fn generate_test_harness(
242243
/// &test_const3,
243244
/// ]);
244245
/// }
246+
/// ```
245247
///
246248
/// Most of the Ident have the usual def-site hygiene for the AST pass. The
247249
/// exception is the `test_const`s. These have a syntax context that has two

src/librustc_codegen_llvm/context.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ pub struct CodegenCx<'ll, 'tcx> {
4949
pub const_cstr_cache: RefCell<FxHashMap<Symbol, &'ll Value>>,
5050

5151
/// Reverse-direction for const ptrs cast from globals.
52-
/// Key is a Value holding a *T,
53-
/// Val is a Value holding a *[T].
52+
///
53+
/// Key is a Value holding a `*T`,
54+
/// Val is a Value holding a `*[T]`.
5455
///
5556
/// Needed because LLVM loses pointer->pointee association
5657
/// when we ptrcast, and we have to ptrcast during codegen
57-
/// of a [T] const because we form a slice, a (*T,usize) pair, not
58+
/// of a `[T]` const because we form a slice, a `(*T,usize)` pair, not
5859
/// a pointer to an LLVM array type. Similar for trait objects.
5960
pub const_unsized: RefCell<FxHashMap<&'ll Value, &'ll Value>>,
6061

src/librustc_codegen_ssa/traits/declare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub trait DeclareMethods<'tcx>: BackendTypes {
3131
/// Use this function when you intend to define a global. This function will
3232
/// return `None` if the name already has a definition associated with it. In that
3333
/// case an error should be reported to the user, because it usually happens due
34-
/// to user’s fault (e.g., misuse of #[no_mangle] or #[export_name] attributes).
34+
/// to user’s fault (e.g., misuse of `#[no_mangle]` or `#[export_name]` attributes).
3535
fn define_global(&self, name: &str, ty: Self::Type) -> Option<Self::Value>;
3636

3737
/// Declare a private global

src/librustc_data_structures/obligation_forest/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct Node<O> {
173173
/// must all be in a non-pending state.
174174
dependents: Vec<usize>,
175175

176-
/// If true, dependents[0] points to a "parent" node, which requires
176+
/// If true, `dependents[0]` points to a "parent" node, which requires
177177
/// special treatment upon error but is otherwise treated the same.
178178
/// (It would be more idiomatic to store the parent node in a separate
179179
/// `Option<usize>` field, but that slows down the common case of

src/librustc_data_structures/transitive_relation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ impl<T: Clone + Debug + Eq + Hash> TransitiveRelation<T> {
289289
///
290290
/// - A != B
291291
/// - A R B is true
292-
/// - for each i, j: B[i] R B[j] does not hold
292+
/// - for each i, j: `B[i]` R `B[j]` does not hold
293293
///
294294
/// The intuition is that this moves "one step up" through a lattice
295295
/// (where the relation is encoding the `<=` relation for the lattice).

src/librustc_hir/arena.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
/// Leaving `few` out will cause the type to get its own dedicated `TypedArena` which is
66
/// faster and more memory efficient if there is lots of allocations.
77
///
8-
/// Specifying the `decode` modifier will add decode impls for &T and &[T] where T is the type
9-
/// listed. These impls will appear in the implement_ty_decoder! macro.
8+
/// Specifying the `decode` modifier will add decode impls for `&T` and `&[T]`,
9+
/// where `T` is the type listed. These impls will appear in the implement_ty_decoder! macro.
1010
#[macro_export]
1111
macro_rules! arena_types {
1212
($macro:path, $args:tt, $tcx:lifetime) => (

src/librustc_infer/infer/error_reporting/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
843843
///
844844
/// For the following code:
845845
///
846-
/// ```norun
846+
/// ```no_run
847847
/// let x: Foo<Bar<Qux>> = foo::<Bar<Qux>>();
848848
/// ```
849849
///

src/librustc_infer/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
14821482
self.tcx.replace_bound_vars(value, fld_r, fld_t, fld_c)
14831483
}
14841484

1485-
/// See the [`region_constraints::verify_generic_bound`] method.
1485+
/// See the [`region_constraints::RegionConstraintCollector::verify_generic_bound`] method.
14861486
pub fn verify_generic_bound(
14871487
&self,
14881488
origin: SubregionOrigin<'tcx>,

src/librustc_infer/infer/region_constraints/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
810810
)
811811
}
812812

813-
/// See [`RegionInference::region_constraints_added_in_snapshot`].
813+
/// See `InferCtxt::region_constraints_added_in_snapshot`.
814814
pub fn region_constraints_added_in_snapshot(&self, mark: &RegionSnapshot) -> Option<bool> {
815815
self.undo_log[mark.length..]
816816
.iter()

0 commit comments

Comments
 (0)