Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove dependency on $crate metavar #2

Closed
talevy opened this issue May 3, 2015 · 1 comment
Closed

Remove dependency on $crate metavar #2

talevy opened this issue May 3, 2015 · 1 comment

Comments

@talevy
Copy link
Contributor

talevy commented May 3, 2015

I am not sure if this is possible, given how this macro is being used, but I got confused when
my tests would only compile when I had set $crate[ref] to mock.

#[cfg(test)] #[macro_use]
extern crate yup_hyper_mock as mock;

Here is the error when the above was not set:

<mocks macros>:11:1: 11:5 error: failed to resolve. Maybe a missing `extern crate mock`?
<mocks macros>:11 :: mock:: MockStream {
                  ^~~~
<mocks macros>:1:1: 14:68 note: in expansion of mock_connector!
src/lib.rs:66:5: 76:8 note: expansion site
<mocks macros>:11:1: 11:21 error: `mock::MockStream` does not name a structure
<mocks macros>:11 :: mock:: MockStream {
                  ^~~~~~~~~~~~~~~~~~~~
<mocks macros>:1:1: 14:68 note: in expansion of mock_connector!
src/lib.rs:66:5: 76:8 note: expansion site
error: aborting due to 2 previous errors

Thanks!

@Byron Byron closed this as completed in b520fa7 May 4, 2015
@Byron
Copy link
Owner

Byron commented May 4, 2015

Thanks for posting !
The issue should now be fixed, and is live on crates.io in version 0.1.6 .

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants