rust-lang / rust-lang/rust-analyzer
Failed autocomplete for `bevy_transform::components::Transform`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
When using bevy, one can autocomplete Transform from bevy::prelude::Transform just fine. However, this is a re-export from bevy_transform, and when depending directly on that crate it does not show up, as can be seen in the attached screenshot.
There is nothing very interesting going on with how this crate exports this type, so I'm really baffled why it wouldn't show up.
In bevy_transform, we have:
// lib.rs
...
pub mod components;
...
// components/mod.rs
...
mod transform;
pub use transform::*;
...
// components/transform.rs
...
pub struct Transform { ... }
...
rust-analyzer version: rust-analyzer 1.74.0 (79e9716 2023-11-13)
rustc version: rustc 1.74.0 (79e9716c9 2023-11-13)
relevant settings: I don't think there's anything interesting at play here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the missing autocomplete using the bevy_transform exports shown in lib.rs, components/mod.rs, and components/transform.rs, then trace rust-analyzer's autocomplete handling for this re-export pattern. Done means Transform is suggested when depending directly on bevy_transform, as it already is through bevy::prelude::Transform.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100