workers-rs repo RA feature detection

Does anyone else have the problem that rust-analyzer doesn't properly detect the enabled features in the examples in the workers-rs repo?
4 Replies
avsaase
avsaaseOP9mo ago
I'm getting a lot of errors like this
error[E0308]: mismatched types
--> examples/router/src/lib.rs:10:1
|
10 | #[event(fetch)]
| ^^^^^^^^^^^^^^^ expected `Request`, found `Request<Body>`
11 | async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
| ---- arguments to this function are incorrect
|
= note: `Request<Body>` and `worker::Request` have similar names, but are actually distinct types
error[E0308]: mismatched types
--> examples/router/src/lib.rs:10:1
|
10 | #[event(fetch)]
| ^^^^^^^^^^^^^^^ expected `Request`, found `Request<Body>`
11 | async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
| ---- arguments to this function are incorrect
|
= note: `Request<Body>` and `worker::Request` have similar names, but are actually distinct types
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
avsaase
avsaaseOP9mo ago
Interestingly I get this error on all the other example and not the axum example (when I remove it from the excluded list)
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server