Skip to content

Commit 73cd86f

Browse files
Remove DebugJson calls
those were development tools for the backend, they should not appear in production. See #1699
1 parent e463d3d commit 73cd86f

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

rust-engine/src/backends/lean.rs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use std::sync::LazyLock;
1010
use super::prelude::*;
1111
use crate::{
1212
ast::identifiers::global_id::view::{ConstructorKind, PathSegment, TypeDefKind},
13-
printer::pretty_ast::DebugJSON,
1413
resugarings::BinOp,
1514
};
1615

@@ -371,7 +370,7 @@ set_option linter.unusedVariables false
371370
.group()
372371
.append(line!()),
373372
GenericParamKind::Const { .. } => {
374-
todo!("-- to debug const param run: {}", DebugJSON(param))
373+
todo!("-- Unsupported const param")
375374
}
376375
}
377376
})),
@@ -386,10 +385,7 @@ set_option linter.unusedVariables false
386385
) -> DocBuilder<'a, Self, A> {
387386
match generic_constraint {
388387
GenericConstraint::Type(impl_ident) => docs![impl_ident].brackets(),
389-
_ => todo!(
390-
"-- to debug generic constraint run: {}",
391-
DebugJSON(generic_constraint)
392-
),
388+
_ => todo!("-- unsupported constraint"),
393389
}
394390
}
395391

@@ -475,10 +471,7 @@ set_option linter.unusedVariables false
475471
docs![constructor]
476472
} else if base.is_some() {
477473
// TODO : support base expressions. see https://github.com/cryspen/hax/issues/1637
478-
todo!(
479-
"-- Unsupported base expressions for structs. To see the ast of the item run : {}",
480-
DebugJSON(&**kind)
481-
)
474+
todo!("-- Unsupported base expressions for structs.")
482475
} else {
483476
docs![constructor, line!(), self.arguments(fields, is_record)]
484477
.nest(INDENT)
@@ -709,16 +702,10 @@ set_option linter.unusedVariables false
709702
let kind = impl_.kind();
710703
match &kind {
711704
ImplExprKind::Self_ => docs![self.render_last(item)],
712-
_ => todo!(
713-
"sorry \n-- support only local associated types: {}\n",
714-
DebugJSON(ty)
715-
), // Support only local associated types
705+
_ => todo!("sorry \n-- support only local associated types\n"), // Support only local associated types
716706
}
717707
}
718-
_ => todo!(
719-
"sorry \n-- unsupported type, to debug run: {}\n",
720-
DebugJSON(ty)
721-
),
708+
_ => todo!("sorry \n-- unsupported type\n"),
722709
}
723710
}
724711

@@ -996,7 +983,7 @@ set_option linter.unusedVariables false
996983
]
997984
.nest(INDENT),
998985
],
999-
_ => todo!("-- to debug missing item run: {}", DebugJSON(kind)),
986+
_ => todo!("-- unsupported item"),
1000987
}
1001988
}
1002989

@@ -1032,7 +1019,7 @@ set_option linter.unusedVariables false
10321019
.brackets()]))
10331020
]
10341021
}
1035-
_ => todo!("-- to debug missing trait item run: {}", DebugJSON(kind)),
1022+
_ => todo!("-- unsupported trait item"),
10361023
}]
10371024
}
10381025

0 commit comments

Comments
 (0)