Skip to content

Commit

Permalink
fix broken links in doc-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Jul 11, 2023
1 parent 95f3b5d commit de98a4c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion constraint-evaluation-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ fn generate_degree_lowering_table_code(
quote!(
//! The degree lowering table contains the introduced variables that allow
//! lowering the degree of the AIR. See
//! [`master_table::AIR_TARGET_DEGREE`]
//! [`crate::table::master_table::AIR_TARGET_DEGREE`]
//! for additional information.
//!
//! This file has been auto-generated. Any modifications _will_ be lost.
Expand Down
11 changes: 6 additions & 5 deletions triton-vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub mod vm;
#[macro_use]
pub mod macros {
/// Parse an entire program written in [Triton assembly][tasm].
/// The resulting [`Program`] can be [run](Program::run).
/// The resulting [`Program`](crate::program::Program) can be
/// [run](crate::program::Program::run).
///
/// It is possible to use string-like interpolation to insert instructions, arguments, labels,
/// or other substrings into the program.
Expand All @@ -62,9 +63,9 @@ pub mod macros {
///
/// Any type with an appropriate [`Display`](std::fmt::Display) implementation can be
/// interpolated. This includes, for example, primitive types like `u64` and `&str`, but also
/// [`Instruction`](instruction::Instruction)s,
/// [`BFieldElement`](triton_vm::BFieldElement)s, and
/// [`Label`](instruction::LabelledInstruction)s, among others.
/// [`Instruction`](crate::instruction::Instruction)s,
/// [`BFieldElement`](crate::BFieldElement)s, and
/// [`Label`](crate::instruction::LabelledInstruction)s, among others.
///
/// ```
/// # use triton_vm::triton_program;
Expand Down Expand Up @@ -106,7 +107,7 @@ pub mod macros {
}

/// Parse [Triton assembly][tasm] into a list of labelled
/// [`Instruction`](instruction::LabelledInstruction)s.
/// [`Instruction`](crate::instruction::LabelledInstruction)s.
/// Similar to [`triton_program!`](crate::triton_program), it is possible to use string-like
/// interpolation to insert instructions, arguments, labels, or other expressions.
///
Expand Down
2 changes: 1 addition & 1 deletion triton-vm/src/proof_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use twenty_first::shared_math::x_field_element::XFieldElement;

type AuthenticationStructure = Vec<Digest>;

/// A `FriResponse` is an [`AuthenticationStructure`] together with the values of the
/// A `FriResponse` is an `AuthenticationStructure` together with the values of the
/// revealed leaves of the Merkle tree. Together, they correspond to the
/// queried indices of the FRI codeword (of that round).
#[derive(Debug, Clone, PartialEq, Eq, Hash, BFieldCodec)]
Expand Down
2 changes: 1 addition & 1 deletion triton-vm/src/proof_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ where
.collect()
}

/// A thin wrapper around [`H::sample_scalars`].
/// A thin wrapper around [`H::sample_scalars`](AlgebraicHasher::sample_scalars).
pub fn sample_scalars(&mut self, num_scalars: usize) -> Vec<XFieldElement> {
H::sample_scalars(&mut self.sponge_state, num_scalars)
}
Expand Down
4 changes: 2 additions & 2 deletions triton-vm/src/table/challenges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub enum ChallengeId {
///
/// Used by the evaluation argument [`PrepareChunkEvalArg`][prep] and in the Hash Table.
///
/// [rate]: crate::stark::StarkHasher::RATE
/// [rate]: twenty_first::shared_math::tip5::RATE
/// [prep]: crate::table::table_column::ProgramExtTableColumn::PrepareChunkRunningEvaluation
ProgramAttestationPrepareChunkIndeterminate,

Expand All @@ -126,7 +126,7 @@ pub enum ChallengeId {
/// Used by the evaluation arguments [`SendChunkEvalArg`][send] and
/// [`ReceiveChunkEvalArg`][recv]. See also: [`ProgramAttestationPrepareChunkIndeterminate`].
///
/// [rate]: crate::stark::StarkHasher::RATE
/// [rate]: twenty_first::shared_math::tip5::RATE
/// [send]: crate::table::table_column::ProgramExtTableColumn::SendChunkRunningEvaluation
/// [recv]: crate::table::table_column::HashExtTableColumn::ReceiveChunkRunningEvaluation
ProgramAttestationSendChunkIndeterminate,
Expand Down
2 changes: 1 addition & 1 deletion triton-vm/src/table/constraint_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ impl<II: InputIndicator> ConstraintCircuitMonad<II> {
}

/// Returns all nodes used in the multicircuit.
/// This is distinct from [`ConstraintCircuitBuilder::all_nodes`] because it
/// This is distinct from `ConstraintCircuitBuilder::all_nodes` because it
/// 1. only considers nodes used in the given multicircuit, not all nodes in the builder,
/// 2. returns the nodes as [`ConstraintCircuit`]s, not as [`ConstraintCircuitMonad`]s, and
/// 3. keeps duplicates, allowing to count how often a node occurs.
Expand Down
4 changes: 2 additions & 2 deletions triton-vm/src/table/hash_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub struct ExtHashTable {}
/// The empty program is not valid since any valid [`Program`][program] must execute
/// instruction `halt`.
///
/// [program]: triton_opcodes::program::Program
/// [program]: crate::program::Program
/// [round_no]: HashBaseTableColumn::RoundNumber
/// [prog_hash]: Self::ProgramHashing
/// [sponge]: Self::Sponge
Expand All @@ -88,7 +88,7 @@ pub struct ExtHashTable {}
pub enum HashTableMode {
/// The mode in which the [`Program`][program] is hashed. This is part of program attestation.
///
/// [program]: triton_opcodes::program::Program
/// [program]: crate::program::Program
ProgramHashing,

/// The mode in which Sponge instructions, _i.e._, `absorb_init`, `absorb`, and `squeeze`,
Expand Down
8 changes: 5 additions & 3 deletions triton-vm/src/table/table_column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub enum ProgramExtTableColumn {
/// Resets to zero after each chunk.
/// Relevant for program attestation.
///
/// [rate]: crate::stark::StarkHasher::RATE
/// [rate]: twenty_first::shared_math::tip5::RATE
PrepareChunkRunningEvaluation,

/// An evaluation argument over all [`RATE`][rate]-sized chunks of instructions,
Expand All @@ -92,7 +92,7 @@ pub enum ProgramExtTableColumn {
///
/// The counterpart to [`RcvChunkEvalArg`](HashExtTableColumn::ReceiveChunkRunningEvaluation).
///
/// [rate]: crate::stark::StarkHasher::RATE
/// [rate]: twenty_first::shared_math::tip5::RATE
/// [prep]: ProgramExtTableColumn::PrepareChunkRunningEvaluation
SendChunkRunningEvaluation,
}
Expand Down Expand Up @@ -345,10 +345,12 @@ pub enum HashBaseTableColumn {
#[derive(Display, Debug, Clone, Copy, PartialEq, Eq, EnumIter, EnumCountMacro, Hash)]
pub enum HashExtTableColumn {
/// The evaluation argument corresponding to receiving instructions in chunks of size
/// [`RATE`](StarkHasher::RATE). The chunks are hashed in Sponge mode.
/// [`RATE`][rate]. The chunks are hashed in Sponge mode.
/// This allows program attestation.
///
/// The counterpart to [`SendChunkEvalArg`](ProgramExtTableColumn::SendChunkRunningEvaluation).
///
/// [rate]: twenty_first::shared_math::tip5::RATE
ReceiveChunkRunningEvaluation,

HashInputRunningEvaluation,
Expand Down

0 comments on commit de98a4c

Please sign in to comment.