Skip to content

Commit 82e25d8

Browse files
committed
remove parameter warning
1 parent 116b0a7 commit 82e25d8

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/ast.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,6 @@ impl Scope {
717717

718718
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
719719
pub enum WarningName {
720-
ParameterMissing(WitnessName),
721720
ModuleItemIgnored,
722721
ArithmeticOperationCouldOverflow,
723722
DivisionCouldPanicOnZero,
@@ -726,9 +725,6 @@ pub enum WarningName {
726725
impl fmt::Display for WarningName {
727726
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
728727
match self {
729-
WarningName::ParameterMissing(witness_name) => {
730-
write!(f, "Parameter `{witness_name}` is missing.")
731-
}
732728
WarningName::ModuleItemIgnored => write!(f, "ModuleItem was ignored"),
733729
WarningName::ArithmeticOperationCouldOverflow => write!(f, "This operator panics if the result overflows. To handle overflow, use the jet directly and destructure the (bool, uN) result."),
734730
WarningName::DivisionCouldPanicOnZero => write!(f, "This operator panics if the divisor is zero. To handle division by zero, use a jet and check the divisor before using it."),
@@ -745,13 +741,6 @@ pub struct Warning {
745741
}
746742

747743
impl Warning {
748-
fn parameter_missing<S: Into<Span>>(name: WitnessName, span: S) -> Self {
749-
Warning {
750-
canonical_name: WarningName::ParameterMissing(name),
751-
span: span.into(),
752-
}
753-
}
754-
755744
fn module_item_ignored<S: Into<Span>>(span: S) -> Self {
756745
Warning {
757746
canonical_name: WarningName::ModuleItemIgnored,
@@ -1255,13 +1244,12 @@ impl AbstractSyntaxTree for SingleExpression {
12551244
(SingleExpressionInner::Witness(name.clone()), vec![])
12561245
}
12571246
parse::SingleExpressionInner::Parameter(name) => {
1258-
// TODO: Should parameters be shown as warnings? Ideally there should not be any parameters during compile
12591247
scope
12601248
.insert_parameter(name.shallow_clone(), ty.clone())
12611249
.with_span(from)?;
12621250
(
12631251
SingleExpressionInner::Parameter(name.shallow_clone()),
1264-
vec![Warning::parameter_missing(name.shallow_clone(), from)],
1252+
vec![],
12651253
)
12661254
}
12671255
parse::SingleExpressionInner::Variable(identifier) => {

0 commit comments

Comments
 (0)