diff --git a/compiler/noirc_frontend/src/elaborator/expressions.rs b/compiler/noirc_frontend/src/elaborator/expressions.rs index 8bee7241d43..0ca1d99f4d2 100644 --- a/compiler/noirc_frontend/src/elaborator/expressions.rs +++ b/compiler/noirc_frontend/src/elaborator/expressions.rs @@ -91,7 +91,7 @@ impl<'context> Elaborator<'context> { (HirExpression::Error, Type::Error) } ExpressionKind::AsTraitPath(_) => { - self.push_err(ResolverError::UnquoteUsedOutsideQuote { span: expr.span }); + self.push_err(ResolverError::AsTraitPathNotYetImplemented { span: expr.span }); (HirExpression::Error, Type::Error) } ExpressionKind::TypePath(path) => return self.elaborate_type_path(path), diff --git a/compiler/noirc_frontend/src/hir/resolution/errors.rs b/compiler/noirc_frontend/src/hir/resolution/errors.rs index 6298ef796b4..68ac84d42c6 100644 --- a/compiler/noirc_frontend/src/hir/resolution/errors.rs +++ b/compiler/noirc_frontend/src/hir/resolution/errors.rs @@ -128,6 +128,8 @@ pub enum ResolverError { ArrayLengthInterpreter { error: InterpreterError }, #[error("The unquote operator '$' can only be used within a quote expression")] UnquoteUsedOutsideQuote { span: Span }, + #[error("\"as trait path\" not yet implemented")] + AsTraitPathNotYetImplemented { span: Span }, #[error("Invalid syntax in macro call")] InvalidSyntaxInMacroCall { span: Span }, #[error("Macros must be comptime functions")] @@ -548,6 +550,13 @@ impl<'a> From<&'a ResolverError> for Diagnostic { *span, ) }, + ResolverError::AsTraitPathNotYetImplemented { span } => { + Diagnostic::simple_error( + "\"as trait path\" not yet implemented".into(), + "".into(), + *span, + ) + }, ResolverError::InvalidSyntaxInMacroCall { span } => { Diagnostic::simple_error( "Invalid syntax in macro call".into(),