Turbopack: Annotate ReadVcFuture as must_use instead of annotating functions that return it#90839
Turbopack: Annotate ReadVcFuture as must_use instead of annotating functions that return it#90839
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merging this PR will not alter performance
Comparing Footnotes
|
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **401 kB** → **401 kB** ✅ -14 B80 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
df4467c to
ecb4b7c
Compare
…nctions that return it
ecb4b7c to
cf29870
Compare
…nctions 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.

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
Futuretrait already has this annotation, why do we need it on the type? The annotation on the trait only applies if the function returnsimpl Futureordyn Future. Our functions return the named type.