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

anotating function breakes rust-analyzer #5

Open
LeSnake04 opened this issue Nov 19, 2022 · 5 comments
Open

anotating function breakes rust-analyzer #5

LeSnake04 opened this issue Nov 19, 2022 · 5 comments

Comments

@LeSnake04
Copy link

Without autodefault:
image

With autodefault
image

When a function is annotated, the lsp fails to suggest fields.

@zetanumbers
Copy link
Contributor

Have you tried saving the current file?

@LeSnake04 LeSnake04 changed the title anotating function breakes rust-amalyer anotating function breakes rust-analyzer Nov 21, 2022
@LeSnake04
Copy link
Author

saving or restarting helix doesnt help

@LeSnake04
Copy link
Author

could reproduce in vscodium

@LeSnake04
Copy link
Author

May be related

warning: struct update has no effect, all the fields in the struct have already been specified
  --> src/enemy.rs:70:1
   |
70 | #[autodefault]
   | ^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
note: the lint level is defined here
  --> src/main.rs:2:9
   |
2  | #![warn(clippy::all)]
   |         ^^^^^^^^^^^
   = note: `#[warn(clippy::needless_update)]` implied by `#[warn(clippy::all)]`
   = note: this warning originates in the attribute macro `autodefault` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: struct update has no effect, all the fields in the struct have already been specified
  --> src/main.rs:67:1
   |
67 | #[autodefault]
   | ^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
   = note: this warning originates in the attribute macro `autodefault` (in Nightly builds, run with -Z macro-backtrace for more info)

@Lucretiel
Copy link
Owner

Known issue; seems like a rust-analyzer issue (where it doesn't run the proc macro, or it doesn't run it early enough). I'm not sure this is fixable in autodefault but will leave this issue open until a resolution is found.

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

No branches or pull requests

3 participants