Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acvm-repo/acir/src/circuit/brillig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum BrilligOutputs {

/// This is purely a wrapper struct around a list of Brillig opcode's which represents
/// a full Brillig function to be executed by the Brillig VM.
Comment thread
TomAFrench marked this conversation as resolved.
/// This is stored separately on a program and accessed through a [BrilligPointer].
Comment thread
TomAFrench marked this conversation as resolved.
/// This is stored separately on a program and accessed through a [BrilligFunctionId].
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Default, Debug, Hash)]
#[cfg_attr(feature = "arb", derive(proptest_derive::Arbitrary))]
pub struct BrilligBytecode<F> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub enum BlackBoxFuncCall<F> {
/// - input: (witness, bit_size)
RANGE { input: FunctionInput<F> },
/// Computes the Blake2s hash of the inputs, as specified in
/// https://tools.ietf.org/html/rfc7693
/// <https://tools.ietf.org/html/rfc7693>
/// - inputs are a byte array, i.e a vector of (witness, 8)
/// - output is a byte array of length 32, i.e. an array of 32
/// (witness, 8), constrained to be the blake2s of the inputs.
Expand Down
2 changes: 1 addition & 1 deletion acvm-repo/acvm/src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn transform_assert_messages<F: Clone>(
.collect()
}

/// Applies [`ProofSystemCompiler`][crate::ProofSystemCompiler] specific optimizations to a [`Circuit`].
/// Applies backend specific optimizations to a [`Circuit`].
///
/// Runs multiple passes until the output stabilizes.
pub fn compile<F: AcirField>(
Expand Down
4 changes: 2 additions & 2 deletions acvm-repo/acvm/src/compiler/optimizers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use self::unused_memory::UnusedMemoryOptimizer;

use super::{AcirTransformationMap, transform_assert_messages};

/// Applies [`ProofSystemCompiler`][crate::ProofSystemCompiler] independent optimizations to a [`Circuit`].
/// Applies backend independent optimizations to a [`Circuit`].
pub fn optimize<F: AcirField>(acir: Circuit<F>) -> (Circuit<F>, AcirTransformationMap) {
// Track original acir opcode positions throughout the transformation passes of the compilation
// by applying the modifications done to the circuit opcodes and also to the opcode_positions (delete and insert)
Expand All @@ -34,7 +34,7 @@ pub fn optimize<F: AcirField>(acir: Circuit<F>) -> (Circuit<F>, AcirTransformati
(acir, transformation_map)
}

/// Applies [`ProofSystemCompiler`][crate::ProofSystemCompiler] independent optimizations to a [`Circuit`].
/// Applies backend independent optimizations to a [`Circuit`].
///
/// Accepts an injected `acir_opcode_positions` to allow optimizations to be applied in a loop.
#[tracing::instrument(level = "trace", name = "optimize_acir" skip(acir, acir_opcode_positions))]
Expand Down
6 changes: 3 additions & 3 deletions acvm-repo/acvm/src/compiler/transformers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use super::{
/// The value was determined by running tests.
const MAX_TRANSFORMER_PASSES: usize = 3;

/// Applies [`ProofSystemCompiler`][crate::ProofSystemCompiler] specific optimizations to a [`Circuit`].
/// Applies backend specific optimizations to a [`Circuit`].
pub fn transform<F: AcirField>(
acir: Circuit<F>,
expression_width: ExpressionWidth,
Expand All @@ -44,7 +44,7 @@ pub fn transform<F: AcirField>(
(acir, transformation_map)
}

/// Applies [`ProofSystemCompiler`][crate::ProofSystemCompiler] specific optimizations to a [`Circuit`].
/// Applies backend specific optimizations to a [`Circuit`].
///
/// Accepts an injected `acir_opcode_positions` to allow transformations to be applied directly after optimizations.
///
Expand Down Expand Up @@ -87,7 +87,7 @@ pub(super) fn transform_internal<F: AcirField>(
(acir, acir_opcode_positions)
}

/// Applies [`ProofSystemCompiler`][crate::ProofSystemCompiler] specific optimizations to a [`Circuit`].
/// Applies backend specific optimizations to a [`Circuit`].
///
/// Accepts an injected `acir_opcode_positions` to allow transformations to be applied directly after optimizations.
///
Expand Down
2 changes: 1 addition & 1 deletion acvm-repo/acvm/src/pwg/brillig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ fn extract_failure_payload_from_memory<F: AcirField>(
}
}

/// Encapsulates a request from a Brillig VM process that encounters a [foreign call opcode][acir::brillig_vm::Opcode::ForeignCall]
/// Encapsulates a request from a Brillig VM process that encounters a [foreign call opcode][brillig_vm::brillig::Opcode::ForeignCall]
/// where the result of the foreign call has not yet been provided.
///
/// The caller must resolve this opcode externally based upon the information in the request.
Expand Down
4 changes: 2 additions & 2 deletions acvm-repo/acvm/src/pwg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
/// Most commonly this will be due to an unsatisfied constraint due to invalid inputs to the circuit.
Failure(OpcodeResolutionError<F>),

/// The ACVM has encountered a request for a Brillig [foreign call][acir::brillig_vm::Opcode::ForeignCall]
/// The ACVM has encountered a request for a Brillig [foreign call][brillig_vm::brillig::Opcode::ForeignCall]
/// to retrieve information from outside of the ACVM. The result of the foreign call must be passed back
/// to the ACVM using [`ACVM::resolve_pending_foreign_call`].
///
Expand All @@ -55,7 +55,7 @@
RequiresForeignCall(ForeignCallWaitInfo<F>),

/// The ACVM has encountered a request for an ACIR [call][acir::circuit::Opcode]
/// to execute a separate ACVM instance. The result of the ACIR call must be passd back to the ACVM.

Check warning on line 58 in acvm-repo/acvm/src/pwg/mod.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (passd)
///
/// Once this is done, the ACVM can be restarted to solve the remaining opcodes.
RequiresAcirCall(AcirCallWaitInfo<F>),
Expand Down Expand Up @@ -312,7 +312,7 @@
}
}

/// Resolves a foreign call's [result][acir::brillig_vm::ForeignCallResult] using a result calculated outside of the ACVM.
/// Resolves a foreign call's [result][brillig_vm::brillig::ForeignCallResult] using a result calculated outside of the ACVM.
///
/// The ACVM can then be restarted to solve the remaining Brillig VM process as well as the remaining ACIR opcodes.
pub fn resolve_pending_foreign_call(&mut self, foreign_call_result: ForeignCallResult<F>) {
Expand Down
6 changes: 2 additions & 4 deletions acvm-repo/bn254_blackbox_solver/src/generator/generators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,18 @@ fn default_generators() -> &'static [Affine; NUM_DEFAULT_GENERATORS] {
})
}

/// Derives generator points via [hash-to-curve][hash_to_curve].
/// Derives generator points.
///
/// # ALGORITHM DESCRIPTION
///
/// 1. Each generator has an associated "generator index" described by its location in the vector
/// 2. a 64-byte preimage buffer is generated with the following structure:
/// - bytes 0-31: BLAKE3 hash of domain_separator
/// - bytes 32-63: generator index in big-endian form
/// 3. The [hash-to-curve algorithm][hash_to_curve] is used to hash the above into a curve point.
/// 3. The hash-to-curve algorithm is used to hash the above into a curve point.
Comment thread
vezenovm marked this conversation as resolved.
///
/// NOTE: The domain separator is included to ensure that it is possible to derive independent sets of
/// index-addressable generators.
///
/// [hash_to_curve]: super::hash_to_curve::hash_to_curve
pub fn derive_generators(
domain_separator_bytes: &[u8],
num_generators: u32,
Expand Down
2 changes: 1 addition & 1 deletion acvm-repo/brillig/src/opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub enum BrilligOpcode<F> {
offset_address: MemoryAddress,
},
/// We don't support dynamic jumps or calls
/// See https://github.com/ethereum/aleth/issues/3404 for reasoning
/// See <https://github.com/ethereum/aleth/issues/3404> for reasoning
Call {
location: Label,
},
Expand Down
5 changes: 3 additions & 2 deletions compiler/fm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ impl FileManager {
pub trait NormalizePath {
/// Replacement for `std::fs::canonicalize` that doesn't verify the path exists.
///
/// Plucked from https://github.com/rust-lang/cargo/blob/fede83ccf973457de319ba6fa0e36ead454d2e20/src/cargo/util/paths.rs#L61
/// Advice from https://www.reddit.com/r/rust/comments/hkkquy/comment/fwtw53s/
/// Plucked from <https://github.com/rust-lang/cargo/blob/fede83ccf973457de319ba6fa0e36ead454d2e20/src/cargo/util/paths.rs#L61>
///
/// Advice from <https://www.reddit.com/r/rust/comments/hkkquy/comment/fwtw53s/>
fn normalize(&self) -> PathBuf;
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ pub const DEFAULT_EXPRESSION_WIDTH: ExpressionWidth = ExpressionWidth::Bounded {
///
/// The transformations are _not_ covered by the check that decides whether we can use the cached artifact.
/// That comparison is based on on [CompiledProgram::hash] which is a persisted version of the hash of the input
/// [`ast::Program`][noirc_frontend::monomorphization::ast::Program], whereas the output [`circuit::Program`][acir::circuit::Program]
/// [`ast::Program`][noirc_frontend::monomorphization::ast::Program], whereas the output [`circuit::Program`][acvm::acir::circuit::Program]
/// contains the final optimized ACIR opcodes, including the transformation done after this compilation.
#[tracing::instrument(level = "trace", skip_all, fields(function_name = context.function_name(&main_function)))]
pub fn compile_no_check(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! This module analyzes the liveness of variables (non-constant values) throughout a function.
//! It uses the approach detailed in the section 4.2 of this paper https://inria.hal.science/inria-00558509v2/document
//! It uses the approach detailed in the section 4.2 of this paper <https://inria.hal.science/inria-00558509v2/document>

use crate::ssa::ir::{
basic_block::{BasicBlock, BasicBlockId},
Expand Down
2 changes: 2 additions & 0 deletions compiler/noirc_frontend/src/ast/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,10 @@ pub struct PathSegment {
impl PathSegment {
/// Returns the span where turbofish happen. For example:
///
/// ```noir
Comment thread
vezenovm marked this conversation as resolved.
/// foo::<T>
/// ~^^^^
/// ```
///
/// Returns an empty span at the end of `foo` if there's no turbofish.
pub fn turbofish_span(&self) -> Span {
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/elaborator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ impl<'context> Elaborator<'context> {
}

/// Add the given generics to scope.
/// Each generic will have a fresh Shared<TypeBinding> associated with it.
/// Each generic will have a fresh `Shared<TypeBinding>` associated with it.
pub fn add_generics(&mut self, generics: &UnresolvedGenerics) -> Generics {
vecmap(generics, |generic| {
let mut is_error = false;
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/hir/def_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl CrateDefMap {
}

/// Go through all modules in this crate, and find all functions in
/// each module with the #[export] attribute
/// each module with the `#[export]` attribute
pub fn get_all_exported_functions<'a>(
&'a self,
interner: &'a NodeInterner,
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl Context<'_, '_> {
if parent.is_empty() { name.into() } else { format!("{parent}::{name}") }
}

/// Returns a fully-qualified path to the given [StructId] from the given [CrateId]. This function also
/// Returns a fully-qualified path to the given [TypeId] from the given [CrateId]. This function also
/// account for the crate names of dependencies.
///
/// For example, if you project contains a `main.nr` and `foo.nr` and you provide the `main_crate_id` and the
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/hir_def/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/// is either a type variable of some kind or a Type::Constant.
String(Box<Type>),

/// FmtString(N, Vec<E>) is an array of characters of length N that contains
/// `FmtString(N, Vec<E>)` is an array of characters of length N that contains
/// a list of fields specified inside the string by the following regular expression r"\{([\S]+)\}"
FmtString(Box<Type>, Box<Type>),

Expand Down Expand Up @@ -2379,7 +2379,7 @@
}

let recur_on_binding = |id, replacement: &Type| {
// Prevent recuring forever if there's a `T := T` binding

Check warning on line 2382 in compiler/noirc_frontend/src/hir_def/types.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (recuring)
if replacement.type_variable_id() == Some(id) {
replacement.clone()
} else {
Expand Down Expand Up @@ -2465,7 +2465,7 @@
Type::Tuple(fields)
}
Type::Forall(typevars, typ) => {
// Trying to substitute_helper a variable de, substitute_bound_typevarsfined within a nested Forall

Check warning on line 2468 in compiler/noirc_frontend/src/hir_def/types.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (typevarsfined)
// is usually impossible and indicative of an error in the type checker somewhere.
for var in typevars {
assert!(!type_bindings.contains_key(&var.id()));
Expand Down Expand Up @@ -2632,7 +2632,7 @@
}
}

/// Follow bindings if this is a type variable or generic to the first non-typevariable

Check warning on line 2635 in compiler/noirc_frontend/src/hir_def/types.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (typevariable)
/// type. Unlike `follow_bindings`, this won't recursively follow any bindings on any
/// fields or arguments of this type.
pub fn follow_bindings_shallow(&self) -> Cow<Type> {
Expand All @@ -2657,7 +2657,7 @@

/// Replace any `Type::NamedGeneric` in this type with a `Type::TypeVariable`
/// using to the same inner `TypeVariable`. This is used during monomorphization
/// to bind to named generics since they are unbindable during type checking.

Check warning on line 2660 in compiler/noirc_frontend/src/hir_def/types.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (unbindable)
pub fn replace_named_generics_with_type_variables(&mut self) {
match self {
Type::FieldElement
Expand Down Expand Up @@ -3163,7 +3163,7 @@
len.hash(state);
env.hash(state);
}
Type::Tuple(elems) => elems.hash(state),

Check warning on line 3166 in compiler/noirc_frontend/src/hir_def/types.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (elems)

Check warning on line 3166 in compiler/noirc_frontend/src/hir_def/types.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (elems)
Type::DataType(def, args) => {
def.hash(state);
args.hash(state);
Expand Down
6 changes: 3 additions & 3 deletions compiler/noirc_frontend/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ impl Token {
}

/// These are all the operators allowed as part of
/// a short-hand assignment: a <op>= b
/// a short-hand assignment: `a <op>= b`
pub fn assign_shorthand_operators() -> [Token; 10] {
use Token::*;
[Plus, Minus, Star, Slash, Percent, Ampersand, Caret, ShiftLeft, ShiftRight, Pipe]
Expand Down Expand Up @@ -955,10 +955,10 @@ pub enum SecondaryAttribute {
Export,
Field(String),

/// A custom tag attribute: #['foo]
/// A custom tag attribute: `#['foo]`
Tag(CustomAttribute),

/// An attribute expected to run a comptime function of the same name: #[foo]
/// An attribute expected to run a comptime function of the same name: `#[foo]`
Meta(MetaAttribute),

Abi(String),
Expand Down
2 changes: 2 additions & 0 deletions compiler/noirc_frontend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
//! The noir compiler is separated into the following passes which are listed
//! in order in square brackets. The inputs and outputs of each pass are also given:
//!
//! ```verbatim
//! Source file -[Lexing]-> Tokens -[Parsing]-> Ast -[Name Resolution]-> Hir -[Type Checking]-> Hir -[Monomorphization]-> Monomorphized Ast
//! ```
//!
//! After the monomorphized ast is created, it is passed to the noirc_evaluator crate to convert it to SSA form,
//! perform optimizations, convert to ACIR and eventually prove/verify the program.
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/node_interner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@
interned_statement_kinds: noirc_arena::Arena<StatementKind>,

// Interned `UnresolvedTypeData`s during comptime code.
interned_unresolved_type_datas: noirc_arena::Arena<UnresolvedTypeData>,

Check warning on line 218 in compiler/noirc_frontend/src/node_interner.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (datas)

// Interned `Pattern`s during comptime code.
interned_patterns: noirc_arena::Arena<Pattern>,

/// Determins whether to run in LSP mode. In LSP mode references are tracked.

Check warning on line 223 in compiler/noirc_frontend/src/node_interner.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (Determins)
pub(crate) lsp_mode: bool,

/// Store the location of the references in the graph.
Expand Down Expand Up @@ -700,7 +700,7 @@
quoted_types: Default::default(),
interned_expression_kinds: Default::default(),
interned_statement_kinds: Default::default(),
interned_unresolved_type_datas: Default::default(),

Check warning on line 703 in compiler/noirc_frontend/src/node_interner.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (datas)
interned_patterns: Default::default(),
lsp_mode: false,
location_indices: LocationIndices::default(),
Expand Down Expand Up @@ -821,7 +821,7 @@
type_id
}

/// Adds [TypeLiasId] and [Location] to the type_alias_ref vector
/// Adds [TypeAliasId] and [Location] to the type_alias_ref vector
/// So that we can later resolve [Location]s type aliases from the LSP requests
pub fn add_type_alias_ref(&mut self, type_id: TypeAliasId, location: Location) {
self.type_alias_ref.push((type_id, location));
Expand Down
6 changes: 3 additions & 3 deletions compiler/noirc_frontend/src/resolve_locations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl NodeInterner {
///
/// The [Location] may not necessarily point to the beginning of the item
/// so we check if the location's span is contained within the start or end
/// of each items [Span]
/// of each items [Location]
pub fn find_location_index(&self, location: Location) -> Option<impl Into<Index>> {
let mut location_candidate: Option<(&Index, &Location)> = None;

Expand All @@ -31,7 +31,7 @@ impl NodeInterner {
location_candidate.map(|(index, _location)| *index)
}

/// Returns the Type of the expression that exists at the given location.
/// Returns the [Type] of the expression that exists at the given location.
pub fn type_at_location(&self, location: Location) -> Option<&Type> {
// This is similar to `find_location_index` except that we skip indexes for which there is no type
let mut location_candidate: Option<(&Index, &Location, &Type)> = None;
Expand All @@ -52,7 +52,7 @@ impl NodeInterner {
location_candidate.map(|(_index, _location, typ)| typ)
}

/// Returns the [Location] of the definition of the given Ident found at [Span] of the given [FileId].
/// Returns the [Location] of the definition of the given Ident found at `location`.
/// Returns [None] when definition is not found.
pub fn get_definition_location_from(
&self,
Expand Down
2 changes: 1 addition & 1 deletion tooling/fuzzer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! This module has been adapted from Foundry's fuzzing implementation for the EVM.
//! https://github.com/foundry-rs/foundry/blob/6a85dbaa62f1c305f31cab37781232913055ae28/crates/evm/evm/src/executors/fuzz/mod.rs#L40
//! <https://github.com/foundry-rs/foundry/blob/6a85dbaa62f1c305f31cab37781232913055ae28/crates/evm/evm/src/executors/fuzz/mod.rs#L40>
//!
//! Code is used under the MIT license.

Expand Down
1 change: 1 addition & 0 deletions tooling/nargo_cli/src/cli/export_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use super::check_cmd::check_crate_and_report_errors;

use super::{LockType, PackageOptions, WorkspaceCommand};

#[allow(rustdoc::broken_intra_doc_links)]
/// Exports functions marked with #[export] attribute
#[derive(Debug, Clone, Args)]
pub(crate) struct ExportCommand {
Expand Down
1 change: 1 addition & 0 deletions tooling/nargo_cli/src/cli/init_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use nargo::package::{CrateName, PackageType};
use noir_artifact_cli::fs::artifact::write_to_file;
use std::path::PathBuf;

#[allow(rustdoc::broken_intra_doc_links)]
/// Create a Noir project in the current directory.
#[derive(Debug, Clone, Args)]
pub(crate) struct InitCommand {
Expand Down
2 changes: 1 addition & 1 deletion tooling/nargo_cli/src/cli/lsp_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::errors::CliError;
///
/// Starts an LSP server which allows IDEs such as VS Code to display diagnostics in Noir source.
///
/// VS Code Noir Language Support: https://marketplace.visualstudio.com/items?itemName=noir-lang.vscode-noir
/// VS Code Noir Language Support: <https://marketplace.visualstudio.com/items?itemName=noir-lang.vscode-noir>
#[derive(Debug, Clone, Args)]
pub(crate) struct LspCommand;

Expand Down
1 change: 1 addition & 0 deletions tooling/nargo_cli/src/cli/new_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use clap::Args;
use nargo::package::{CrateName, PackageType};
use std::path::PathBuf;

#[allow(rustdoc::broken_intra_doc_links)]
/// Create a Noir project in a new directory.
#[derive(Debug, Clone, Args)]
pub(crate) struct NewCommand {
Expand Down
2 changes: 1 addition & 1 deletion tooling/nargo_fmt/src/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//!
//! It's heavily inspired by this excellent blog post:
//!
//! https://yorickpeterse.com/articles/how-to-write-a-code-formatter/
//! <https://yorickpeterse.com/articles/how-to-write-a-code-formatter/>
//!
//! However, some changes were introduces to handle comments and other particularities of Noir.
use std::ops::Deref;
Expand Down
3 changes: 1 addition & 2 deletions tooling/noirc_artifacts/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ impl ContractArtifact {
pub struct ContractFunctionArtifact {
pub name: String,

/// Hash of the [`Program`][noirc_frontend::monomorphization::ast::Program] from which the [`ContractFunction`]
/// was compiled.
/// Hash of the monomorphized program from which the [`ContractFunction`] was compiled.
#[serde(default)] // For backwards compatibility (it was missing).
#[serde(serialize_with = "serialize_hash", deserialize_with = "deserialize_hash")]
pub hash: u64,
Expand Down
3 changes: 1 addition & 2 deletions tooling/noirc_artifacts/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ use super::{deserialize_hash, serialize_hash};
pub struct ProgramArtifact {
pub noir_version: String,

/// Hash of the [`Program`][noirc_frontend::monomorphization::ast::Program] from which this [`ProgramArtifact`]
/// was compiled.
/// Hash of the monomorphized program from which this [`ProgramArtifact`] was compiled.
///
/// Used to short-circuit compilation in the case of the source code not changing since the last compilation.
#[serde(serialize_with = "serialize_hash", deserialize_with = "deserialize_hash")]
Expand Down
Loading