Skip to content

Commit 2ab85ed

Browse files
committed
docs: fix broken links etc
Remove the deprecated (well, renamed) "allow broken intradoc links" cfg flag, which exposes a ton of broken doc links. Mostly just uses of [] or <> that aren't in backticks. Fix them all. The one morally questionable change is to change two doclink references to Policy::enumerate_policy_tree to no longer be doclinks. The problem is that this function only exists when the `compiler` flag is on. In master in ebaa31b we just removed these references as well, but arguably we should have fixed them. Anyway in 9.x we're certainly not going to bend over backward to fix stuff like this.
1 parent ea54520 commit 2ab85ed

File tree

6 files changed

+21
-22
lines changed

6 files changed

+21
-22
lines changed

src/descriptor/key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ impl DescriptorPublicKey {
442442
}
443443
}
444444

445+
#[doc(hidden)]
445446
#[deprecated(note = "use at_derivation_index instead")]
446-
/// Deprecated name of [`at_derivation_index`].
447447
pub fn derive(self, index: u32) -> DefiniteDescriptorKey {
448448
self.at_derivation_index(index)
449449
}

src/descriptor/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,8 @@ impl Descriptor<DescriptorPublicKey> {
542542
.expect("BIP 32 key index substitution cannot fail")
543543
}
544544

545+
#[doc(hidden)]
545546
#[deprecated(note = "use at_derivation_index instead")]
546-
/// Deprecated name for [`at_derivation_index`].
547547
pub fn derive(&self, index: u32) -> Descriptor<DefiniteDescriptorKey> {
548548
self.at_derivation_index(index)
549549
}
@@ -569,7 +569,7 @@ impl Descriptor<DescriptorPublicKey> {
569569
/// See [`at_derivation_index`] and `[derived_descriptor`] for more documentation.
570570
///
571571
/// [`at_derivation_index`]: Self::at_derivation_index
572-
/// [`derived_descriptor`]: crate::DerivedDescriptor::derived_descriptor
572+
/// [`derived_descriptor`]: crate::Descriptor::derived_descriptor
573573
///
574574
/// # Errors
575575
///

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub trait MiniscriptKey: Clone + Eq + Ord + fmt::Debug + fmt::Display + hash::Ha
167167
/// The associated [`hash256::Hash`] for this [`MiniscriptKey`],
168168
/// used in the hash256 fragment.
169169
type Hash256: Clone + Eq + Ord + fmt::Display + fmt::Debug + hash::Hash;
170-
/// The associated [`ripedmd160::Hash`] for this [`MiniscriptKey`] type.
170+
/// The associated [`ripemd160::Hash`] for this [`MiniscriptKey`] type.
171171
/// used in the ripemd160 fragment
172172
type Ripemd160: Clone + Eq + Ord + fmt::Display + fmt::Debug + hash::Hash;
173173

src/miniscript/decode.rs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ enum NonTerm {
124124
/// The average user should always use the [`crate::Descriptor`] APIs. Advanced users
125125
/// who want deal with Miniscript ASTs should use the [`crate::Miniscript`] APIs.
126126
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
127-
#[allow(broken_intra_doc_links)]
128127
pub enum Terminal<Pk: MiniscriptKey, Ctx: ScriptContext> {
129128
/// `1`
130129
True,
@@ -164,38 +163,38 @@ pub enum Terminal<Pk: MiniscriptKey, Ctx: ScriptContext> {
164163
Check(Arc<Miniscript<Pk, Ctx>>),
165164
/// `DUP IF [V] ENDIF`
166165
DupIf(Arc<Miniscript<Pk, Ctx>>),
167-
/// [T] VERIFY
166+
/// `[T] VERIFY`
168167
Verify(Arc<Miniscript<Pk, Ctx>>),
169-
/// SIZE 0NOTEQUAL IF [Fn] ENDIF
168+
/// `SIZE 0NOTEQUAL IF [Fn] ENDIF`
170169
NonZero(Arc<Miniscript<Pk, Ctx>>),
171-
/// [X] 0NOTEQUAL
170+
/// `[X] 0NOTEQUAL`
172171
ZeroNotEqual(Arc<Miniscript<Pk, Ctx>>),
173172
// Conjunctions
174-
/// [V] [T]/[V]/[F]/[Kt]
173+
/// `[V] [T]/[V]/[F]/[Kt]`
175174
AndV(Arc<Miniscript<Pk, Ctx>>, Arc<Miniscript<Pk, Ctx>>),
176-
/// [E] [W] BOOLAND
175+
/// `[E] [W] BOOLAND`
177176
AndB(Arc<Miniscript<Pk, Ctx>>, Arc<Miniscript<Pk, Ctx>>),
178-
/// [various] NOTIF [various] ELSE [various] ENDIF
177+
/// `[various] NOTIF [various] ELSE [various] ENDIF`
179178
AndOr(
180179
Arc<Miniscript<Pk, Ctx>>,
181180
Arc<Miniscript<Pk, Ctx>>,
182181
Arc<Miniscript<Pk, Ctx>>,
183182
),
184183
// Disjunctions
185-
/// [E] [W] BOOLOR
184+
/// `[E] [W] BOOLOR`
186185
OrB(Arc<Miniscript<Pk, Ctx>>, Arc<Miniscript<Pk, Ctx>>),
187-
/// [E] IFDUP NOTIF [T]/[E] ENDIF
186+
/// `[E] IFDUP NOTIF [T]/[E] ENDIF`
188187
OrD(Arc<Miniscript<Pk, Ctx>>, Arc<Miniscript<Pk, Ctx>>),
189-
/// [E] NOTIF [V] ENDIF
188+
/// `[E] NOTIF [V] ENDIF`
190189
OrC(Arc<Miniscript<Pk, Ctx>>, Arc<Miniscript<Pk, Ctx>>),
191-
/// IF [various] ELSE [various] ENDIF
190+
/// `IF [various] ELSE [various] ENDIF`
192191
OrI(Arc<Miniscript<Pk, Ctx>>, Arc<Miniscript<Pk, Ctx>>),
193192
// Thresholds
194-
/// [E] ([W] ADD)* k EQUAL
193+
/// `[E] ([W] ADD)* k EQUAL`
195194
Thresh(usize, Vec<Arc<Miniscript<Pk, Ctx>>>),
196-
/// k (<key>)* n CHECKMULTISIG
195+
/// `k (<key>)* n CHECKMULTISIG`
197196
Multi(usize, Vec<Pk>),
198-
/// <key> CHECKSIG (<key> CHECKSIGADD)*(n-1) k NUMEQUAL
197+
/// `<key> CHECKSIG (<key> CHECKSIGADD)*(n-1) k NUMEQUAL`
199198
MultiA(usize, Vec<Pk>),
200199
}
201200

src/policy/concrete.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ pub enum DescriptorCtx<Pk> {
228228
Wsh,
229229
/// Sh-wrapped [Wsh][`Descriptor::Wsh`]
230230
ShWsh,
231-
/// [Tr][`Descriptor::Tr`] where the Option<Pk> corresponds to the internal_key if no internal
231+
/// [Tr][`Descriptor::Tr`] where the `Option<Pk>` corresponds to the internal_key if no internal
232232
/// key can be inferred from the given policy
233233
Tr(Option<Pk>),
234234
}
@@ -427,7 +427,7 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
427427
}
428428

429429
/// Compile the [`Policy`] into a [`Tr`][`Descriptor::Tr`] Descriptor, with policy-enumeration
430-
/// by [`Policy::enumerate_policy_tree`].
430+
/// by `Policy::enumerate_policy_tree`.
431431
///
432432
/// ### TapTree compilation
433433
///
@@ -439,7 +439,7 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
439439
///
440440
/// ### Policy enumeration
441441
///
442-
/// Refer to [`Policy::enumerate_policy_tree`] for the current strategy implemented.
442+
/// Refer to `Policy::enumerate_policy_tree` for the current strategy implemented.
443443
#[cfg(feature = "compiler")]
444444
pub fn compile_tr_private_experimental(
445445
&self,

src/psbt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ pub trait PsbtExt {
594594

595595
/// Get the sighash message(data to sign) at input index `idx` based on the sighash
596596
/// flag specified in the [`Psbt`] sighash field. If the input sighash flag psbt field is `None`
597-
/// the [`SchnorrSighashType::Default`](bitcoin::util::sighash::SchnorrSighashType::Default) is chosen
597+
/// the [`SchnorrSighashType::Default`] is chosen
598598
/// for for taproot spends, otherwise [`EcdsaSignatureHashType::All`](bitcoin::EcdsaSighashType::All) is chosen.
599599
/// If the utxo at `idx` is a taproot output, returns a [`PsbtSighashMsg::TapSighash`] variant.
600600
/// If the utxo at `idx` is a pre-taproot output, returns a [`PsbtSighashMsg::EcdsaSighash`] variant.

0 commit comments

Comments
 (0)