diff --git a/compiler/noirc_frontend/src/lexer/lexer.rs b/compiler/noirc_frontend/src/lexer/lexer.rs index 3006ccdc5db..7a2197ebb93 100644 --- a/compiler/noirc_frontend/src/lexer/lexer.rs +++ b/compiler/noirc_frontend/src/lexer/lexer.rs @@ -410,7 +410,7 @@ impl<'a> Lexer<'a> { // too many hashes (unlikely in practice) // also, Rust disallows 256+ hashes as well return Err(LexerErrorKind::UnexpectedCharacter { - span: Span::single_char(self.position + 255), + span: Span::single_char(start + 255), found: Some('#'), expected: "\"".to_owned(), });