GREsau / GREsau/okapi

rocket_okapi macro breaks recent rust-analyzer ("expected Expr")

Open
#166 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
740
Forks
127
PR merge metrics
No merged PRs in 30d

Description

When using recent versions of rust, okapi macros break rust-analyzer, with cryptic message "expected Expr".

Rustc compiles properly, so it is only visible when editing code

Simple example that reproduces:

```rust
use rocket::get;
use rocket_okapi::openapi;

#[openapi(tag = "Toto")]
#[get("/")]
async fn test(x: u32) {
println!("x: {x}");
todo!()
}

fn main() {
println!("Hello, world!");
}
```

I'm preparing a fix, I think it would be very nice to release a 0.9.1 with a backport of it 🙏

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.