Skip to content

[DX] rust-analyzer macro import textual scope workaround#668

Open
sjfhsjfh wants to merge 2 commits into
mainfrom
rust-analyzer-workaround
Open

[DX] rust-analyzer macro import textual scope workaround#668
sjfhsjfh wants to merge 2 commits into
mainfrom
rust-analyzer-workaround

Conversation

@sjfhsjfh

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-level ttl! 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.

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.

3 participants