[DX] rust-analyzer macro import textual scope workaround#668
Open
sjfhsjfh wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds explicit macro imports at the top of several modules to work around a rust-analyzer limitation with “textual scope” macro resolution (similar to rust-analyzer#10644), improving IDE diagnostics/completions without changing runtime behavior.
Changes:
- Add
#[allow(unused_imports)] use crate::ttl;in modules that rely on the crate-levelttl!macro. - Add
#[allow(unused_imports)] use super::itl;/use super::mtl;in submodules relying on parent-module localization macros.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| phira/src/scene/song.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in the song scene module. |
| phira/src/scene/profile.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in the profile scene module. |
| phira/src/scene/main.rs | Import super::itl to help rust-analyzer resolve itl! uses in the scene main module. |
| phira/src/scene.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses within the scene module. |
| phira/src/page/settings.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in settings page. |
| phira/src/page/library.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in library page. |
| phira/src/page/home.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in home page. |
| phira/src/page/event.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in event page. |
| phira/src/mp/panel.rs | Import super::mtl to help rust-analyzer resolve mtl! uses in multiplayer panel. |
| phira/src/client/model.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in client model module. |
| phira/src/charts_view.rs | Import crate::ttl to help rust-analyzer resolve ttl! uses in charts view. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to:
rust-lang/rust-analyzer#10644
Related:
rust-lang/rust-analyzer#1795