Skip to content

Commit 1c5db60

Browse files
committed
remove parameter warning
1 parent b6b2ed1 commit 1c5db60

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

src/ast.rs

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

721721
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
722722
pub enum WarningName {
723-
ParameterMissing(WitnessName),
724723
ModuleItemIgnored,
725724
ArithmeticOperationCouldOverflow,
726725
DivisionCouldPanicOnZero,
@@ -729,9 +728,6 @@ pub enum WarningName {
729728
impl fmt::Display for WarningName {
730729
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
731730
match self {
732-
WarningName::ParameterMissing(witness_name) => {
733-
write!(f, "Parameter `{witness_name}` is missing.")
734-
}
735731
WarningName::ModuleItemIgnored => write!(f, "ModuleItem was ignored"),
736732
WarningName::ArithmeticOperationCouldOverflow => write!(f, "This operator panics if the result overflows. To handle overflow, use the jet directly and destructure the (bool, uN) result."),
737733
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."),
@@ -748,13 +744,6 @@ pub struct Warning {
748744
}
749745

750746
impl Warning {
751-
fn parameter_missing<S: Into<Span>>(name: WitnessName, span: S) -> Self {
752-
Warning {
753-
canonical_name: WarningName::ParameterMissing(name),
754-
span: span.into(),
755-
}
756-
}
757-
758747
fn module_item_ignored<S: Into<Span>>(span: S) -> Self {
759748
Warning {
760749
canonical_name: WarningName::ModuleItemIgnored,
@@ -1258,13 +1247,12 @@ impl AbstractSyntaxTree for SingleExpression {
12581247
(SingleExpressionInner::Witness(name.clone()), vec![])
12591248
}
12601249
parse::SingleExpressionInner::Parameter(name) => {
1261-
// TODO: Should parameters be shown as warnings? Ideally there should not be any parameters during compile
12621250
scope
12631251
.insert_parameter(name.shallow_clone(), ty.clone())
12641252
.with_span(from)?;
12651253
(
12661254
SingleExpressionInner::Parameter(name.shallow_clone()),
1267-
vec![Warning::parameter_missing(name.shallow_clone(), from)],
1255+
vec![],
12681256
)
12691257
}
12701258
parse::SingleExpressionInner::Variable(identifier) => {

0 commit comments

Comments
 (0)