Skip to content
Merged
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,11 +792,18 @@ impl<'a> FunctionContext<'a> {
/// Looks up the value of a given local variable. Expects the variable to have
/// been previously defined or panics otherwise.
pub(super) fn lookup(&self, id: LocalId) -> Values {
self.definitions.get(&id).expect("lookup: variable not defined").clone()
self.definitions
.get(&id)
.unwrap_or_else(|| panic!("lookup: variable {id:?} not defined"))
.clone()
}

pub(super) fn lookup_global(&self, id: GlobalId) -> Values {
self.shared_context.globals.get(&id).expect("lookup_global: variable not defined").clone()
self.shared_context
.globals
.get(&id)
.unwrap_or_else(|| panic!("lookup_global: variable {id:?} not defined"))
.clone()
}

/// Extract the given field of the tuple. Panics if the given Values is not
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"crypdoku",
"csat",
"ctstring",
"curr",
"curvegroup",
"databus",
"debouncer",
Expand Down
1 change: 1 addition & 0 deletions tooling/ast_fuzzer/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cargo-fuzz = true
arbitrary.workspace = true
color-eyre.workspace = true
libfuzzer-sys.workspace = true
strum.workspace = true

acir.workspace = true
noirc_abi.workspace = true
Expand Down
Loading
Loading