diff --git a/crates/nu-parser/src/parse_keywords.rs b/crates/nu-parser/src/parse_keywords.rs index a843619a99..0667cd182c 100644 --- a/crates/nu-parser/src/parse_keywords.rs +++ b/crates/nu-parser/src/parse_keywords.rs @@ -1109,8 +1109,8 @@ pub fn parse_module_block( } _ => ( garbage_pipeline(&pipeline.commands[0].parts), - Some(ParseError::UnexpectedKeyword( - "expected def or export keyword".into(), + Some(ParseError::ExpectedKeyword( + "def or export keyword".into(), pipeline.commands[0].parts[0], )), ),