-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated
deleting custom error and returning generic Unexpected
error instead
#483
Comments
Repeated
deleting error and returning generic "expected got" errorRepeated
deleting custom error and returning generic Unexpected
error
Repeated
deleting custom error and returning generic Unexpected
errorRepeated
deleting custom error and returning generic Unexpected
error instead
Found a workaround: #[test]
fn test_comment_unclosed_repeated() {
let input = "##".repeat(3) + "#";
assert_eq!(
comment()
.repeated()
.collect::<Vec<()>>()
.parse(&input)
.into_result()
.unwrap_err(),
vec![MyErr::UnclosedComment {
start: (6..7).into()
}]
);
} Notice the additonal |
That's quite intriguing. The only difference between the two should be that the output of |
Yes, it is the only change that makes |
Consider the following code:
All tests beside
test_comment_unclosed_repeated
run successfully.This is the output of the failing test:
As you can see, instead of the expected custom
UnclosedComment
error, a genericUnexpected
error is returned instead.I traced the issue to this line where my
UnclosedComment
error get's deleted.The text was updated successfully, but these errors were encountered: