Skip to content
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

Fix to use $crate in path macros #124

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

bouzuya
Copy link
Contributor

@bouzuya bouzuya commented Sep 6, 2023

error[E0433]: failed to resolve: could not find `path` in `struct_path`
 --> tests/path_test.rs:7:16
  |
7 |     assert_eq!(firestore::path!(MyTestStructure::some_id), "some_id");
  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `path` in `struct_path`
  |
  = note: this error originates in the macro `firestore::path` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `paths` in `struct_path`
 --> tests/path_test.rs:9:9
  |
9 |         firestore::paths!(MyTestStructure::{some_id, some_num}),
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `paths` in `struct_path`
  |
  = note: this error originates in the macro `firestore::paths` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `path` in `struct_path`
  --> tests/path_test.rs:13:9
   |
13 |         firestore::path_camel_case!(MyTestStructure::some_id),
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `path` in `struct_path`
   |
   = note: this error originates in the macro `firestore::path_camel_case` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `paths` in `struct_path`
  --> tests/path_test.rs:17:9
   |
17 |         firestore::paths_camel_case!(MyTestStructure::{some_id, some_num}),
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `paths` in `struct_path`
   |
   = note: this error originates in the macro `firestore::paths_camel_case` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0433`.
error: could not compile `firestore` (test "path_test") due to 4 previous errors

 *  The terminal process "cargo 'test', '--package', 'firestore', '--test', 'path_test', '--', 'test_ambiguous_path_macro', '--exact', '--nocapture'" terminated with exit code: 101.
 *  Terminal will be reused by tasks, press any key to close it.

FYI: https://doc.rust-lang.org/reference/macros-by-example.html#metavariables

@abdolence
Copy link
Owner

Hey, thanks for your contributions and especially appreciated for tests (!)

Copy link
Owner

@abdolence abdolence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abdolence abdolence merged commit 688564d into abdolence:master Sep 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants