Skip to content

Commit 5314f01

Browse files
committed
doc: misc rustdoc things
1 parent a91d648 commit 5314f01

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/librustc_builtin_macros/test_harness.rs

+4-2
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
@@ -253,8 +255,8 @@ fn generate_test_harness(
253255
///
254256
/// The expansion here can be controlled by two attributes:
255257
///
256-
/// `reexport_test_harness_main` provides a different name for the `main`
257-
/// function and `test_runner` provides a path that replaces
258+
/// [`TestCtxt::reexport_test_harness_main`] provides a different name for the `main`
259+
/// function and [`TestCtxt::test_runner`] provides a path that replaces
258260
/// `test::test_main_static`.
259261
fn mk_main(cx: &mut TestCtxt<'_>) -> P<ast::Item> {
260262
let sp = cx.def_site;

src/librustc_lint/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
//! other phases of the compiler, which are generally required to hold in order
77
//! to compile the program at all.
88
//!
9-
//! Most lints can be written as `LintPass` instances. These run after
9+
//! Most lints can be written as [LintPass] instances. These run after
1010
//! all other analyses. The `LintPass`es built into rustc are defined
11-
//! within `rustc_session::lint::builtin`,
11+
//! within [rustc_session::lint::builtin],
1212
//! which has further comments on how to add such a lint.
1313
//! rustc can also load user-defined lint plugins via the plugin mechanism.
1414
//!
@@ -19,7 +19,7 @@
1919
//! example) requires more effort. See `emit_lint` and `GatherNodeLevels`
2020
//! in `context.rs`.
2121
//!
22-
//! Some code also exists in `rustc_session::lint`, `rustc_middle::lint`.
22+
//! Some code also exists in [rustc_session::lint], [rustc_middle::lint].
2323
//!
2424
//! ## Note
2525
//!

0 commit comments

Comments
 (0)