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 macro-not-found error with rust-nightly #211

Merged

Conversation

stefunctional
Copy link
Contributor

Running cargo test fails complaining that the macro stringified_module_code cannot be found in this scope.

Version: rustc 1.80.0-nightly (e82c861d7 2024-05-04)

error: cannot find macro `stringified_module_code` in this scope
  --> src/libc.rs:9:10
   |
9  | #![doc = stringified_module_code!()]
   |          ^^^^^^^^^^^^^^^^^^^^^^^ consider moving the definition of `stringified_module_code` before this call
   |
note: a macro with the same name exists, but it appears later at here
  --> src/libc.rs:68:18
   |
68 |     macro_rules! stringified_module_code {() => (
   |                  ^^^^^^^^^^^^^^^^^^^^^^^

I am not sure because rules around macro scopes are somewhat complex, but it seems that the macro should not be found either with textual scope or path-based scope (none by default), so it looks like rustc fixed an implementation bug incorrectly allowing this macro to be found, but I could be wrong.

Running `cargo test` fails complaining that the macro
`stringified_module_code` cannot be found in this scope.
@stefunctional
Copy link
Contributor Author

The CI failures seem unrelated to this PR -- some .NET issue.

Copy link
Collaborator

@danielhenrymantilla danielhenrymantilla left a comment

Choose a reason for hiding this comment

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

Awesome thanks! I'll try to make a release out of this shortly 🙏

@danielhenrymantilla danielhenrymantilla merged commit 7b40688 into getditto:master May 6, 2024
107 of 110 checks 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.

2 participants