next.js
9d0fbf13 - Turbopack: Annotate ReadVcFuture as must_use instead of annotating functions that return it (#90839)

Commit
50 days ago
Turbopack: Annotate ReadVcFuture as must_use instead of annotating functions that return it (#90839) It's a little less error-prone if it's in one place (on the type) than in many (on the functions). I also added it to `ReadRawVcFuture`. https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute - **Are these equivalent?** Yes. - **The** **`Future`** **trait already has this annotation, why do we need it on the type?** The annotation on the trait only applies if the function returns `impl Future` or `dyn Future`. Our functions return the named type.
Author
bgw bgw
Parents
Loading