From 02a3430ef07cda2a8c082ae36f0a27237d357377 Mon Sep 17 00:00:00 2001 From: Tom <35616860+Caedan@users.noreply.github.com> Date: Wed, 4 May 2022 20:41:32 +0100 Subject: [PATCH] Use correct ParseError (#5431) --- crates/nu-parser/src/parse_keywords.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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], )), ),