Merge pull request #1015 from Zokrates/dark64-patch-3
Improve error message on unconstrained variable detection
This commit is contained in:
commit
9a4d6e4c80
2 changed files with 3 additions and 2 deletions
1
changelogs/unreleased/1015-dark64
Normal file
1
changelogs/unreleased/1015-dark64
Normal file
|
@ -0,0 +1 @@
|
|||
Improve error message on unconstrained variable detection
|
|
@ -18,7 +18,7 @@ impl fmt::Display for Error {
|
|||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"Found unconstrained variables during IR analysis (found {} occurrence{})",
|
||||
"Found unconstrained variables during IR analysis (found {} occurrence{}). If this is intentional, use the `--allow-unconstrained-variables` flag.",
|
||||
self.0,
|
||||
if self.0 == 1 { "" } else { "s" }
|
||||
)
|
||||
|
@ -86,7 +86,7 @@ mod tests {
|
|||
let result = UnconstrainedVariableDetector::detect(&p);
|
||||
assert_eq!(
|
||||
result.expect_err("expected an error").to_string(),
|
||||
"Found unconstrained variables during IR analysis (found 1 occurrence)"
|
||||
"Found unconstrained variables during IR analysis (found 1 occurrence). If this is intentional, use the `--allow-unconstrained-variables` flag."
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue