Skip to content

Commit 0882dfd

Browse files
authored
Merge pull request #1717 from cryspen/lean-proper-error-messages
[Lean] Proper error messages
2 parents f2ce72a + 6f56f4f commit 0882dfd

File tree

7 files changed

+267
-69
lines changed

7 files changed

+267
-69
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Changes to hax-lib:
5959

6060
Changes to the Lean backend:
6161
- Improve support for functionalized loops (#1695)
62+
- Improve error messages, having each error (coming from the Lean backend) point to a specific github issue (#1717).
6263

6364
Miscellaneous:
6465
- A lean tutorial has been added to the hax website (#1626)

hax-types/src/diagnostics/mod.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,13 @@ pub struct Diagnostics {
1616
impl std::fmt::Display for Diagnostics {
1717
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1818
match &self.kind {
19-
Kind::Unimplemented { issue_id, details } => write!(
19+
Kind::Unimplemented { issue_id:_, details } => write!(
2020
f,
21-
"something is not implemented yet.{}{}",
22-
match issue_id {
23-
Some(id) => format!("This is discussed in issue https://github.com/hacspec/hax/issues/{id}.\nPlease upvote or comment this issue if you see this error message."),
24-
_ => "".to_string(),
25-
},
21+
"something is not implemented yet.{}",
2622
match details {
2723
Some(details) => format!("\n{}", details),
2824
_ => "".to_string(),
29-
}
25+
},
3026
),
3127
Kind::UnsupportedMacro { id } => write!(
3228
f,

0 commit comments

Comments
 (0)