This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 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(
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`.
259261fn mk_main ( cx : & mut TestCtxt < ' _ > ) -> P < ast:: Item > {
260262 let sp = cx. def_site ;
Original file line number Diff line number Diff line change 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//!
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//!
You can’t perform that action at this time.
0 commit comments