diff src/_doc.rs @ 105:13b4d2a19674

Support Rust v1.75.0. This is the version included in Ubuntu 24.04 LTS and Debian Trixie, so it's old enough to have wide penetration without being too old to get new features (Debian Stable, I love you but v1.63 is just not going to work out).
author Paul Fisher <paul@pfish.zone>
date Thu, 26 Jun 2025 00:48:51 -0400
parents dfcd96a74ac4
children 49d9e2b5c189
line wrap: on
line diff
--- a/src/_doc.rs	Wed Jun 25 16:56:56 2025 -0400
+++ b/src/_doc.rs	Thu Jun 26 00:48:51 2025 -0400
@@ -7,11 +7,15 @@
 /// # Examples
 ///
 /// ```
+/// # use nonstick::{_linklist, _stdlinks};
+/// /// Here is a list of links:
+/// ///
 /// #[doc = _linklist!(pam_get_authtok: man7, manbsd)]
 /// ///
-/// /// ...use it with link references, like the below...
+/// /// The links are defined in the `stdlinks!` invocation below:
 /// ///
 /// #[doc = _stdlinks!(3 pam_get_authtok)]
+/// # fn do_whatever() {}
 /// ```
 #[macro_export]
 #[doc(hidden)]
@@ -57,7 +61,11 @@
 /// # Examples
 ///
 /// ```
+/// # use nonstick::{_guide};
+/// /// See [the guide][mwg].
+/// ///
 /// #[doc = _guide!(mwg: "mwg-expected-by-module-item.html#mwg-pam_get_user")]
+/// # fn do_whatever() {}
 /// ```
 #[macro_export]
 #[doc(hidden)]
@@ -77,11 +85,17 @@
 /// # Examples
 ///
 /// ```
-/// // Both of these formulations create a link reference named `man7`.
-/// #[doc = _man7!(3 fn_name)]
-/// #[doc = _man7!(5 thing_name "SECTION")]
-/// // This one creates a link reference named `link_name`.
-/// #[doc = _man7!(link_name: 1 prog_name "SECTION")]
+/// # use nonstick::_man7;
+/// /// This contains a [link to the man page for malloc][man7].
+/// #[doc = _man7!(3 malloc)]
+/// # fn do_whatever() {}
+///
+/// /// This contains both a link to the ["structure" section of `hgrc`][man7]
+/// /// and a link to the ["environment" section of `systemd`][sysd_env].
+/// ///
+/// #[doc = _man7!(5 hgrc "STRUCTURE")]
+/// #[doc = _man7!(sysd_env: 1 systemd "ENVIRONMENT")]
+/// # fn do_whatever2() {}
 /// ```
 #[macro_export]
 #[doc(hidden)]
@@ -103,11 +117,13 @@
 /// # Examples
 ///
 /// ```
+/// # use nonstick::_manbsd;
 /// // Both of these formulations create a link named `manbsd`.
 /// #[doc = _manbsd!(3 fn_name)]
 /// #[doc = _manbsd!(5 thing_name "SECTION")]
 /// // This one creates a link named `link_name`.
 /// #[doc = _manbsd!(link_name: 1 prog_name "SECTION")]
+/// # fn do_whatever() {}
 /// ```
 #[macro_export]
 #[doc(hidden)]
@@ -128,14 +144,18 @@
 /// # Examples
 ///
 /// ```
-/// // Both of these formulations create a link reference named `xsso`.
-/// // A link to the X/SSO specification for the `pam_set_item` function.
+/// # use nonstick::_xsso;
+/// /// This docstring will [link to the X/SSO spec for `pam_set_item`][xsso].
+/// ///
 /// #[doc = _xsso!(pam_set_item)]
-/// // A link to the HTML page with the given name.
+/// # fn link_one() {}
+/// 
+/// /// This docstring will link to [`some_page`][xsso].
+/// /// I can also link to [the table of contents][spec_toc].
+/// ///
 /// #[doc = _xsso!("some_page.htm#section-id")]
-///
-/// // This one creates a link reference named `spec_toc`.
 /// #[doc = _xsso!(spec_toc: "toc.htm")]
+/// # fn do_whatever() {}
 /// ```
 #[macro_export]
 #[doc(hidden)]
@@ -154,7 +174,11 @@
 /// # Examples
 ///
 /// ```
+/// # use nonstick::_stdlinks;
+/// /// Check out [this][man7], [that][manbsd], or [the other][xsso].
+/// ///
 /// #[doc = _stdlinks!(3 pam_get_item)]
+/// # fn do_whatever() {}
 /// ```
 #[macro_export]
 #[doc(hidden)]