Skip to content

Commit 095ed6b

Browse files
committed
docs: use per-comment reference defs for field links (tidy-compatible)
rust-llm-tidy's link op collapses inline [x](Self::x) links into reference-style [x] + [x]: Self::x. That breaks rustdoc: reference definitions are scoped to the single doc comment they appear in, so defs on one field's docs cannot serve uses on neighboring fields' docs. The op also appends the defs at EOF outside any comment, yielding invalid Rust. Variant C keeps the reference style tidy prefers, but duplicates each def inside every doc comment that uses it, so each comment is self-contained: rustdoc stays green (-D warnings) and rust-llm-tidy leaves the file alone (dry-run reports no changes).
1 parent cfde760 commit 095ed6b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

  • src/reloaded-code-bubblewrap/src/profile

‎src/reloaded-code-bubblewrap/src/profile/builder.rs‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,18 @@ pub struct Builder {
106106
pub(crate) read_only_host_rootfs: bool,
107107
/// Controls whether the sandbox has network access.
108108
pub(crate) network_policy: NetworkPolicy,
109-
/// When `true`, inherited env vars are cleared before applying [`default_env`](Self::default_env) and [`extra_env`](Self::extra_env).
109+
/// When `true`, inherited env vars are cleared before applying [`default_env`] and [`extra_env`].
110+
///
111+
/// [`default_env`]: Self::default_env
112+
/// [`extra_env`]: Self::extra_env
110113
pub(crate) clear_env: bool,
111-
/// Env vars always set (applied before [`extra_env`](Self::extra_env)).
114+
/// Env vars always set (applied before [`extra_env`]).
115+
///
116+
/// [`extra_env`]: Self::extra_env
112117
pub(crate) default_env: Arc<[EnvVar]>,
113-
/// Additional env vars set on top of [`default_env`](Self::default_env).
118+
/// Additional env vars set on top of [`default_env`].
119+
///
120+
/// [`default_env`]: Self::default_env
114121
pub(crate) extra_env: Arc<[EnvVar]>,
115122
/// Tracks whether `bwrap` is usable (checked during [`build`](Self::build)).
116123
pub(crate) availability: Availability,

0 commit comments

Comments
 (0)