File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ fn generate_test_harness(
233
233
///
234
234
/// By default this expands to
235
235
///
236
+ /// ```
236
237
/// #[main]
237
238
/// pub fn main() {
238
239
/// extern crate test;
@@ -242,6 +243,7 @@ fn generate_test_harness(
242
243
/// &test_const3,
243
244
/// ]);
244
245
/// }
246
+ /// ```
245
247
///
246
248
/// Most of the Ident have the usual def-site hygiene for the AST pass. The
247
249
/// exception is the `test_const`s. These have a syntax context that has two
@@ -253,8 +255,8 @@ fn generate_test_harness(
253
255
///
254
256
/// The expansion here can be controlled by two attributes:
255
257
///
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
258
260
/// `test::test_main_static`.
259
261
fn mk_main ( cx : & mut TestCtxt < ' _ > ) -> P < ast:: Item > {
260
262
let sp = cx. def_site ;
Original file line number Diff line number Diff line change 6
6
//! other phases of the compiler, which are generally required to hold in order
7
7
//! to compile the program at all.
8
8
//!
9
- //! Most lints can be written as ` LintPass` instances. These run after
9
+ //! Most lints can be written as [ LintPass] instances. These run after
10
10
//! all other analyses. The `LintPass`es built into rustc are defined
11
- //! within ` rustc_session::lint::builtin` ,
11
+ //! within [ rustc_session::lint::builtin] ,
12
12
//! which has further comments on how to add such a lint.
13
13
//! rustc can also load user-defined lint plugins via the plugin mechanism.
14
14
//!
19
19
//! example) requires more effort. See `emit_lint` and `GatherNodeLevels`
20
20
//! in `context.rs`.
21
21
//!
22
- //! Some code also exists in ` rustc_session::lint`, ` rustc_middle::lint` .
22
+ //! Some code also exists in [ rustc_session::lint], [ rustc_middle::lint] .
23
23
//!
24
24
//! ## Note
25
25
//!
You can’t perform that action at this time.
0 commit comments