You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my attempt to migrate this crate away from the abandoned proc-macro-error crate I discovered these usages of syn::Result::ok were causing test failures with this diff applied:
diff --git a/crates/test-case-core/src/complex_expr.rs b/crates/test-case-core/src/complex_expr.rs
index e708f2e..2a4334e 100644
--- a/crates/test-case-core/src/complex_expr.rs+++ b/crates/test-case-core/src/complex_expr.rs@@ -323,11 +323,11 @@ impl ComplexTestCase {
expected_regex: input.parse()?,
})
} else {
- proc_macro_error::abort!(input.span(), "'with-regex' feature is required to use 'matches-regex' keyword");+ return Err(input.error("'with-regex' feature is required to use 'matches-regex' keyword"));
}
}
} else {
- proc_macro_error::abort!(input.span(), "cannot parse complex expression")+ return Err(input.error("cannot parse complex expression"));
})
}
}
I realize that these .ok() calls are used in cases where expressions and comments are optional, but it would be better to peek and avoid errors so that these .ok()s can be removed to allow the change above.
The text was updated successfully, but these errors were encountered:
In my attempt to migrate this crate away from the abandoned
proc-macro-error
crate I discovered these usages ofsyn::Result::ok
were causing test failures with this diff applied:I realize that these
.ok()
calls are used in cases where expressions and comments are optional, but it would be better to peek and avoid errors so that these.ok()
s can be removed to allow the change above.The text was updated successfully, but these errors were encountered: