Skip to content

Commit

Permalink
chore(errors): Refactor error representation in compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
ymadzhunkov committed Sep 21, 2023
1 parent dda964e commit fe4cdda
Show file tree
Hide file tree
Showing 10 changed files with 437 additions and 307 deletions.
3 changes: 2 additions & 1 deletion compiler/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ pub fn check_crate(
deny_warnings: bool,
) -> CompilationResult<()> {
let mut errors = vec![];
CrateDefMap::collect_defs(crate_id, context, &mut errors);
let diagnostics = CrateDefMap::collect_defs(crate_id, context);
diagnostics.info_file_diagnostics(&mut errors);

if has_errors(&errors, deny_warnings) {
Err(errors)
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_errors/src/reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl std::fmt::Display for CustomDiagnostic {

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CustomLabel {
message: String,
pub message: String,
pub span: Span,
}

Expand Down
Loading

0 comments on commit fe4cdda

Please sign in to comment.