-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
The :path designator is too restrictive in the $name parameter #4
Comments
Thanks for the report! Could you try the |
I've been playing around with it since the report, and this worked without touching the harness macro itself:
It would be nice to be able to put an But since the original problem could be solved without modifying the datatest library, I guess the issue can be closed. |
For some reason $path::whatever is not a valid `path` according to rustc. See: - nextest-rs/datatest-stable#4 - rust-lang/rust#48067
Hi,
I have been using this harness with Great Success (tm), apart from a minor inconvenience.
Background:
To reduce boilerplate with tests separated into modules, I made the following wrapper:
Problem
Unfortunately if I modify the wrapper to use paths:
Cause
It suddenly doesn't work, because rustc cannot properly comprehend
$test::run_test
if$test
apath
and not anident
.This is due to rust-lang/rust#48067.
Solution?
Apparently, one possible workaround is using
$Va : ident $( :: $Vb : ident )*
instead ofpath
, but I have not tested this.Loosening
$name
toexpr
would also solve the problem I think.I'd also be happy with any other idea. What I currently do is just import everything into the crate namespace, but that's going to be problematic sooner or later.
The text was updated successfully, but these errors were encountered: