Improve missing param error span (#4560)

This commit is contained in:
JT 2022-02-19 21:30:29 -05:00 committed by GitHub
parent a32ce93c79
commit 9ea5a2ecd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,10 @@ pub fn check_call(command: Span, sig: &Signature, call: &Call) -> Option<ParseEr
} else {
return Some(ParseError::MissingPositional(
argument.name.clone(),
command,
Span {
start: command.end,
end: command.end,
},
sig.call_signature(),
));
}
@ -134,7 +137,10 @@ pub fn check_call(command: Span, sig: &Signature, call: &Call) -> Option<ParseEr
} else {
Some(ParseError::MissingPositional(
missing.name.clone(),
command,
Span {
start: command.end,
end: command.end,
},
sig.call_signature(),
))
}