bsn! rust-analyzer autocomplete only works for field values after typing the first character
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version and features
Using commit 489818930b7ec268455fe371b3c5b0fb1c0c46c3 (~current 0.19-dev as of writing) with
```toml
bevy = { default-features = false, features = [
"dynamic_linking",
"ghost_nodes",
"experimental_bevy_feathers",
"file_watcher",
"debug",
"serialize",
"ui",
"2d",
]}
```
## What you did
Tried to write a `bsn!` macro invocation, using rust-analyzer autocomplete to suggest a field type:
`|` represents the caret
```rs
fn scene() -> impl Scene {
bsn!{
Node {
position_type: |
}
}
}
```
## What went wrong
rust-analzyer fails to find any suggestions, loading for a while and then letting the editor fall back to showing useless text-based suggestions.
## Additional information
https://github.com/user-attachments/assets/e8a3b154-1b88-4b25-a019-9774782da18e
Macro expansion during the issue:
```rs
// Recursive expansion of bsn! macro
// ==================================
::bevy::scene::SceneScope({
let _res = (::patch(move |value, _context| {
value.position_type;
}));
::core::compile_error! {
"Field `position_type` is missing a value."
}
_res
})
```
Contributor guide
Assessment
This issue has not been assessed yet.